• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision25751e796e83a75e0d443f96694e539ffbf4687a (tree)
Time2020-04-27 19:30:45
AuthorMarcel Patzlaff <m.patzlaff@pilz...>
CommiterWaldemar Brodkorb

Log Message

Rules.mak: Fix check_as for recent binutils versions

As described in https://bugs.busybox.net/show_bug.cgi?id=12801 the
check for '-Wa,--noexecstack' is not working since binutils 2.31.x.

This fix adapts the approach already taken with check_ld and uses a
temporary file. Further, check_gcc is also adapted to avoid future
problems.

Signed-off-by: Marcel Patzlaff <m.patzlaff@pilz.de>

Change Summary

Incremental Difference

--- a/Rules.mak
+++ b/Rules.mak
@@ -189,11 +189,13 @@ endif
189189
190190 # A nifty macro to make testing gcc features easier
191191 check_gcc=$(shell \
192- if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
193- then echo "$(1)"; else echo "$(2)"; fi)
192+ tf="/tmp/cgccucl$$$$.o"; \
193+ if $(CC) $(1) -S -o $$tf -xc /dev/null > /dev/null 2>&1; \
194+ then echo "$(1)"; else echo "$(2)"; fi; rm -f $$tf )
194195 check_as=$(shell \
195- if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \
196- then echo "-Wa,$(1)"; fi)
196+ tf="/tmp/casucl$$$$.o"; \
197+ if $(CC) -Wa,$(1) -Wa,-Z -c -o $$tf -xassembler /dev/null > /dev/null 2>&1; \
198+ then echo "-Wa,$(1)"; fi; rm -f $$tf )
197199 check_ld=$(shell \
198200 tf="/tmp/clducl$$$$.c"; echo "int _start(){return 0;}int main(){return 0;}" >$$tf; \
199201 if $(CC) $(LDFLAG-fuse-ld) $(CFLAG_-Wl--no-warn-mismatch) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null $$tf > /dev/null 2>&1; \