Code Monkey home page Code Monkey logo

Comments (14)

leekillough avatar leekillough commented on May 27, 2024 1

"Librt and Libpthread are included in Bionic lib, which substitutes GLibC in Android, so just remove -pthread (or -lpthread -lrt) flags from your Makefiles" (ref)

from blis.

leekillough avatar leekillough commented on May 27, 2024 1

blis/configure

Line 1252 in a0b04e3

# Special case for RISC-V, whose architecture can be detected with

from blis.

leekillough avatar leekillough commented on May 27, 2024 1

I'm willing to write a PR for this issue this evening.

from blis.

devinamatthews avatar devinamatthews commented on May 27, 2024 1

Thanks @leekillough

from blis.

leo4678 avatar leo4678 commented on May 27, 2024

thanks

it's work when comment out https://github.com/flame/blis/blob/a0b04e3c007f1207e5678bf20c07752906742fb7/common.mk#L970C4-L970C4
and

blis/common.mk

Line 913 in a0b04e3

LDFLAGS += $(LIBPTHREAD)

from blis.

devinamatthews avatar devinamatthews commented on May 27, 2024

@leekillough is there an easy way to check for Bionic in configure?

from blis.

leekillough avatar leekillough commented on May 27, 2024

@devinamatthews SO to the rescue

You can see an example in configure of testing preprocessor macros, for example, here.

from blis.

fgvanzee avatar fgvanzee commented on May 27, 2024

@devinamatthews and I talked about formally supporting this. I'm thinking maybe a --enable-android option?

from blis.

fgvanzee avatar fgvanzee commented on May 27, 2024

Actually, I can't seem to convince myself that -lpthread is ever needed on line 913 since pthreads is included in the link command by default (via line 579). 🤔

from blis.

leekillough avatar leekillough commented on May 27, 2024

I prefer the autodetection option: #ifdef __BIONIC__. A separate explicit option to force it is fine, but the default autodetection should detect Bionic.

It shouldn't be too hard. RISC-V already autodetects using preprocessor macros.

from blis.

fgvanzee avatar fgvanzee commented on May 27, 2024

@leekillough Just to clarify, you're referring to trying to build a dummy .c file that contains #ifdef __BIONIC__ and branching within configure based on the result of that compilation attempt?

from blis.

leekillough avatar leekillough commented on May 27, 2024

I am saying that, just like in RISC-V, it is possible to detect properties in the build environment with preprocessor macros.

A .h or similar file can be "preprocessed" and produce an output based on macros, which can then be parsed or grep'ed for a certain output.

Bionic seems to be an easy property to detect through preprocessor macros.

With cc -E or similar, a source file dependent on Bionic macros can be tested. The source file would have things like #ifdef __BIONIC_ in it, and would output source code dependent on the presence of the macro (whether defined or not).

It is possible to parse the preprocessor output without having to fully compile the source. Please see the RISC-V autodetection code as an example.

from blis.

leekillough avatar leekillough commented on May 27, 2024

See the RISC-V autodetection code for examples

from blis.

fgvanzee avatar fgvanzee commented on May 27, 2024

Thanks for clarifying, @leekillough. Could you share a link to the RISC-V autodetection code?

from blis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.