make: Remove now less necessary -Wl,--file-alignment,4096.

Everything we really care about uses it already, and it won't work with
llvm-mingw toolchain.
This commit is contained in:
Rémi Bernon 2025-01-11 14:09:30 +01:00 committed by Arkadiusz Hiler
parent cc6cd89eac
commit bad2c9268e
2 changed files with 6 additions and 7 deletions

View File

@ -52,7 +52,6 @@ else
MESON_STRIP_ARG := --strip MESON_STRIP_ARG := --strip
endif endif
CROSSLDFLAGS += -Wl,--file-alignment,4096
OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse
SANITY_FLAGS := -fwrapv -fno-strict-aliasing SANITY_FLAGS := -fwrapv -fno-strict-aliasing
DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer

View File

@ -60,10 +60,10 @@ $$(OBJ)/.$(1)-dist$(3):
cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR)/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a cd $$($(2)_LIBDIR$(3)) && find -type l -printf '%p\0$$(DST_LIBDIR)/%p\0' | xargs $(--verbose?) -0 -r -P$$(J) -n2 cp -a
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \ cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \
-printf '--only-keep-debug\0%p\0$$(DST_LIBDIR)/%p.debug\0' | \ -printf '--only-keep-debug\0%p\0$$(DST_LIBDIR)/%p.debug\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy -p --file-alignment=4096 xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy -p
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \ cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \
-printf '--add-gnu-debuglink=$$(DST_LIBDIR)/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR)/%p\0' | \ -printf '--add-gnu-debuglink=$$(DST_LIBDIR)/%p.debug\0--strip-debug\0%p\0$$(DST_LIBDIR)/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy -p --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code xargs $(--verbose?) -0 -r -P$$(J) -n4 objcopy -p --set-section-flags .text=contents,alloc,load,readonly,code
touch $$@ touch $$@
else else
$$(OBJ)/.$(1)-dist$(3): $$(OBJ)/.$(1)-dist$(3):
@ -79,7 +79,7 @@ $$(OBJ)/.$(1)-dist$(3):
-printf '$$(DST_LIBDIR)/%p.debug\0' | xargs $(--verbose?) -0 -r -P$$(J) rm -f -printf '$$(DST_LIBDIR)/%p.debug\0' | xargs $(--verbose?) -0 -r -P$$(J) rm -f
cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \ cd $$($(2)_LIBDIR$(3)) && find -type f -not '(' -iname '*.pc' -or -iname '*.cmake' -or -iname '*.a' -or -iname '*.la' -or -iname '*.def' -or -iname '*.h' ')' \
-printf '--strip-debug\0%p\0$$(DST_LIBDIR)/%p\0' | \ -printf '--strip-debug\0%p\0$$(DST_LIBDIR)/%p\0' | \
xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy -p --file-alignment=4096 --set-section-flags .text=contents,alloc,load,readonly,code xargs $(--verbose?) -0 -r -P$$(J) -n3 objcopy -p --set-section-flags .text=contents,alloc,load,readonly,code
touch $$@ touch $$@
endif endif
@ -161,10 +161,10 @@ endif
endef endef
ifneq ($(UNSTRIPPED_BUILD),) ifneq ($(UNSTRIPPED_BUILD),)
install-strip = objcopy -p --file-alignment=4096 --only-keep-debug $(1) $(2)/$(notdir $(1)).debug && \ install-strip = objcopy -p --only-keep-debug $(1) $(2)/$(notdir $(1)).debug && \
objcopy -p --file-alignment=4096 --add-gnu-debuglink=$(2)/$(notdir $(1)).debug --strip-debug $(1) $(2)/$(notdir $(1)) objcopy -p --add-gnu-debuglink=$(2)/$(notdir $(1)).debug --strip-debug $(1) $(2)/$(notdir $(1))
else else
install-strip = objcopy -p --file-alignment=4096 --strip-debug $(1) $(2)/$(notdir $(1)) && rm -f $(2)/$(notdir $(1)).debug install-strip = objcopy -p --strip-debug $(1) $(2)/$(notdir $(1)) && rm -f $(2)/$(notdir $(1)).debug
endif endif
TARGET_32 := i686-linux-gnu TARGET_32 := i686-linux-gnu