From bad2c9268e944f93eca28a366b55e7672845b60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Sat, 11 Jan 2025 14:09:30 +0100 Subject: [PATCH] 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. --- Makefile.in | 1 - make/rules-common.mk | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index b0354529..75a24aa3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,7 +52,6 @@ else MESON_STRIP_ARG := --strip endif -CROSSLDFLAGS += -Wl,--file-alignment,4096 OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse SANITY_FLAGS := -fwrapv -fno-strict-aliasing DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer diff --git a/make/rules-common.mk b/make/rules-common.mk index a0310193..920c540d 100644 --- a/make/rules-common.mk +++ b/make/rules-common.mk @@ -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 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' | \ - 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' ')' \ -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 $$@ else $$(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 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' | \ - 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 $$@ endif @@ -161,10 +161,10 @@ endif endef ifneq ($(UNSTRIPPED_BUILD),) -install-strip = objcopy -p --file-alignment=4096 --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)) +install-strip = objcopy -p --only-keep-debug $(1) $(2)/$(notdir $(1)).debug && \ + objcopy -p --add-gnu-debuglink=$(2)/$(notdir $(1)).debug --strip-debug $(1) $(2)/$(notdir $(1)) 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 TARGET_32 := i686-linux-gnu