Message ID | 20210305201518.798584-48-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | Add 64 bit time support on legacy ABIs | expand |
* Adhemerval Zanella via Libc-alpha:
> The patch enables for pldd, sprof, ldconfig, and sln.
Should we do this globally at the Makerules level?
Thanks,
Florian
On 05/03/2021 17:43, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> The patch enables for pldd, sprof, ldconfig, and sln. > > Should we do this globally at the Makerules level? Do we have a simple way to accomplish it? _TIME_SIZE and LFS defines should work for 64-bit ABIs, so we have a global rule to enable it I think it would be better indeed.
* Adhemerval Zanella: > On 05/03/2021 17:43, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> The patch enables for pldd, sprof, ldconfig, and sln. >> >> Should we do this globally at the Makerules level? > > Do we have a simple way to accomplish it? _TIME_SIZE and LFS defines > should work for 64-bit ABIs, so we have a global rule to enable it > I think it would be better indeed. Would it be okay to do this for MODULE_NAME=nonlib and MODULE_NAME=ldconfig? Then I think there would be various ways of achieving the desired effect. Thanks, Florian
diff --git a/elf/Makefile b/elf/Makefile index b06bf6ca20..bad8594e64 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -79,6 +79,8 @@ ifeq (yes,$(have-loop-to-function)) CFLAGS-rtld.c += -fno-tree-loop-distribute-patterns endif +CFLAGS-pldd.c += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 + # Compile rtld itself without stack protection. # Also compile all routines in the static library that are elided from # the shared libc because they are in libc.a in the same way. @@ -663,14 +665,23 @@ $(objpfx)ldd: ldd.bash.in $(common-objpfx)soversions.mk \ mv -f $@.new $@ $(objpfx)sprof: $(libdl) +CFLAGS-sprof.c += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o) +CFLAGS-sln.c += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) +include $(o-iterator) +define o-iterator-doit +$(foreach f,$(ldconfig-modules),$(objpfx)$(f)$(o)): CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \ - -D'SLIBDIR="$(slibdir)"' + -D'SLIBDIR="$(slibdir)"' \ + -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 libof-ldconfig = ldconfig CFLAGS-dl-cache.c += $(SYSCONF-FLAGS) CFLAGS-cache.c += $(SYSCONF-FLAGS)