__builtin_thread_pointer

Ken Brown kbrown@cornell.edu
Tue Feb 11 19:26:01 GMT 2025


Does Cygwin support __builtin_thread_pointer?  I'm guessing not, because 
I'm getting a link error (undefined reference to 
`__builtin_thread_pointer') when I try to build some software that uses 
it.  Or is there something that would have to be added to the link 
command line?  The full command line and error message are quoted below, 
in case anyone spots something obvious.

Ken

[242/242] Linking C executable luametatex.exe
FAILED: luametatex.exe
: && /usr/bin/gcc.exe -ggdb -O2 -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=3 -fstack-protector-strong 
--param=ssp-buffer-size=4 
-ffile-prefix-map=/home/kbrown/src/cygluametatex/luametatex-2.11.05-1.x86_64/build=/usr/src/debug/luametatex-2.11.05-1 
-ffile-prefix-map=/home/kbrown/src/cygluametatex/luametatex-2.11.05-1.x86_64/src/luametatex=/usr/src/debug/luametatex-2.11.05-1 
-O2 -g -DNDEBUG -s CMakeFiles/luametatex.dir/source/luametatex.c.o -o 
luametatex.exe -Wl,--out-implib,libluametatex.dll.a 
-Wl,--major-image-version,0,--minor-image-version,0  libtex.a  liblua.a 
libmp.a  libluarest.a  libluasocket.a  libluaoptional.a  libpplib.a 
libminiz.a  libsoftposit.a  libpotrace.a  -ldl  libmimalloc.a  -lpthread 
  -lm && /bin/sh CMakeFiles/luametatex.dir/post-build.sh 7847d1a259c666c4
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
libmimalloc.a(alloc.c.o): in function `_mi_prim_thread_id':
/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/include/mimalloc/prim.h:251:(.text+0x187): 
undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/include/mimalloc/prim.h:251:(.text+0x437): 
undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/include/mimalloc/prim.h:251:(.text+0x4e7): 
undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
libmimalloc.a(alloc.c.o):/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/src/free.c:340:(.text+0x597): 
undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
libmimalloc.a(init.c.o): in function `_mi_prim_thread_id':
/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/include/mimalloc/prim.h:251:(.text+0xd1): 
undefined reference to `__builtin_thread_pointer'
/usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: 
libmimalloc.a(init.c.o):/usr/src/debug/luametatex-2.11.05-1/source/libraries/mimalloc/include/mimalloc/prim.h:251: 
more undefined references to `__builtin_thread_pointer' follow
collect2: error: ld returned 1 exit status


More information about the Cygwin mailing list