Forráskód Böngészése

work around gcc libstdc++ time64 incompatibility

with the default --enable-libstdcxx-time, libstdc++'s configure probes
for the existence of a clock_gettime syscall and sets up the time API
implementation to make direct syscalls, presumably as a workaround for
old glibc tucking away the clock_gettime function in librt, which in
turn depends on libpthread. this breaks since struct timespec does not
match the syscall's interface on 32-bit archs.

passing --enable-libstdcxx-time=rt forces different configure paths
that correctly use the public clock_gettime function and librt if
needed.

this issue should be patched in gcc rather than worked around via
configure options, but I'd rather wait to patch until I understand how
to fix it correctly and produce a patch that's acceptable to upstream
and distros.
Rich Felker 5 éve
szülő
commit
c9d96aeae7
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      litecross/Makefile

+ 1 - 1
litecross/Makefile

@@ -76,7 +76,7 @@ FULL_GCC_CONFIG = --enable-languages=c,c++ \
 	--disable-libmudflap --disable-libsanitizer \
 	--disable-gnu-indirect-function \
 	--disable-libmpx \
-	--enable-libstdcxx-time
+	--enable-libstdcxx-time=rt
 
 FULL_MUSL_CONFIG = $(MUSL_CONFIG) \
 	--prefix= --host=$(TARGET)