Hi Greg,
Greg Ungerer wrote,
Hi Waldemar,
On 1/12/23 18:31, Waldemar Brodkorb wrote:
> THis breaks static building of target alpha:
>
>
/home/wbx/embedded-test/openadk/toolchain_qemu-alpha_uclibc-ng/usr/bin/alpha-openadk-linux-uclibc-gcc
-c libc/misc/auxvt/getauxval.c -o libc/misc/auxvt/getauxval.os -Wall -Wstrict-prototypes
-Wstrict-aliasing -Wp
> In file included from ./ldso/include/ldso.h:189,
> from libc/misc/auxvt/getauxval.c:21:
> ./ldso/include/dl-defs.h:76:10: fatal error: dl-sysdep.h: No such file or directory
> 76 | #include <dl-sysdep.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> gmake[6]: *** [Makerules:372: libc/misc/auxvt/getauxval.os] Error 1
>
> I think it is this part of the patch:
> diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h
> index daa6685cb..e404f17ec 100644
> --- a/ldso/include/dl-defs.h
> +++ b/ldso/include/dl-defs.h
> @@ -72,10 +72,8 @@ typedef struct {
> #endif
> #ifdef _LIBC
> -#ifndef __ARCH_HAS_NO_SHARED__
> /* arch specific defines */
> #include <dl-sysdep.h>
> -#endif
> #ifdef __TARGET_c6x__
> #include <dl-sysdep.h>
> #endif
>
> Any idea?
Yes, that is definitely the cause. I mis-understood the implications
of removing that "#ifndef __ARCH_HAS_NO_SHARED__" conditional.
I am testing a different change here that I think might do ther job better:
--- a/ldso/include/dl-defs.h
+++ b/ldso/include/dl-defs.h
@@ -72,7 +72,7 @@
#endif
#ifdef _LIBC
-#ifndef __ARCH_HAS_NO_SHARED__
+#ifndef __ARCH_HAS_NO_LDSO__
/* arch specific defines */
#include <dl-sysdep.h>
#endif
That fixes the alpha problem, thanks.
But now it fails for ARM FDPIC target.
/home/wbx/embedded-test/openadk/toolchain_qemu-arm-versatilepb_uclibc-ng_arm926ej_s_soft_eabi_fdpic_arm_nommu/usr/bin/arm-openadk-uclinuxfdpiceabi-gcc
-c libc/misc/internals/reloc_static_pie.c -o libc/misc/intern
als/reloc_static_pie.os -Wall -Wstrict-prototypes -Wstrict-aliasing -Wno-nonnull-compare
-funsigned-char -fno-builtin -fcommon -fno-asm -fmerge-all-constants -msoft-float
-std=gnu99 -mlittle-endian -fno-stack-pro
tector -nostdinc -I./include -I./include -include libc-symbols.h
-I./libc/sysdeps/linux/arm -I./libc/sysdeps/linux -I./ldso/ldso/arm -I./ldso/include -I.
-DSTATIC -Os -fstrict-aliasing -fwrapv -fno-ident -mcpu=ar
m926ej-s -mfpu=vfp -mfloat-abi=soft -Os -pipe -fomit-frame-pointer -marm
-Wa,-mfloat-abi=soft -I./libc/sysdeps/linux/common -isystem
/home/wbx/embedded-test/openadk/toolchain_qemu-arm-versatilepb_uclibc-ng_arm926
ej_s_soft_eabi_fdpic_arm_nommu/usr/lib/gcc/arm-openadk-uclinuxfdpiceabi/13.2.0/include-fixed
-isystem
/home/wbx/embedded-test/openadk/toolchain_qemu-arm-versatilepb_uclibc-ng_arm926ej_s_soft_eabi_fdpic_arm_nommu/
usr/lib/gcc/arm-openadk-uclinuxfdpiceabi/13.2.0/include
-I/home/wbx/embedded-test/openadk/target_qemu-arm-versatilepb_uclibc-ng_arm926ej_s_soft_eabi_fdpic_arm_nommu/usr/include/
-DNDEBUG -fPIC -fno-stack-protecto
r -DL_rcrt1 -MT libc/misc/internals/reloc_static_pie.os -MD -MP -MF
libc/misc/internals/.reloc_static_pie.os.dep
Ok, this is strange. I don't see this with my ARM fdpic testing.
Can you send me your uClibc-ng .config file?