summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-12-25 00:09:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-12-25 00:09:36 +0000
commit886ef39baaf802b1f78b6f20f34d5fb7ab2640f7 (patch)
tree1482309d7a0eeea3721424811462eace33ba8b1f /gnu/usr.bin/gcc
parent093f67ca2bd4b863496eb4fab39e4e7441f65100 (diff)
new stacknote.s can't depend on stmp-dirs either or our make will rebuild stuff
during install.
Diffstat (limited to 'gnu/usr.bin/gcc')
-rw-r--r--gnu/usr.bin/gcc/gcc/mklibgcc.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/gnu/usr.bin/gcc/gcc/mklibgcc.in b/gnu/usr.bin/gcc/gcc/mklibgcc.in
index 267cd8098e7..46b1dcfafdd 100644
--- a/gnu/usr.bin/gcc/gcc/mklibgcc.in
+++ b/gnu/usr.bin/gcc/gcc/mklibgcc.in
@@ -299,11 +299,15 @@ for ml in $MULTILIBS; do
if [ "@libgcc_visibility@" = yes -a "$SHLIB_LINK" ]; then
libgcc_a_objs=
echo ""
+ echo "libgcc/${dir}/stacknote.s:"
+ echo ' @( echo | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) '${flags}' -S -o - -xc - | grep .note.GNU-stack || : ) > $@.tmp'
+ echo ' @mv -f $@.tmp $@'
+ echo ""
for o in $libgcc_objs $libgcc_st_objs; do
# .oS objects will have all non-local symbol definitions .hidden
oS=`echo ${o} | sed s~${objext}'$~.oS~g'`
- echo "${oS}: ${o}"
- echo ' @$(NM_FOR_TARGET) '${SHLIB_NM_FLAGS} ${o}' | $(AWK) '\''NF == 3 { print "\t.hidden", $$3 }'\'' | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) '${flags}' -r -nostdinc -nostdlib -o $@ '${o}' -xassembler -'
+ echo "${oS}: libgcc/${dir}/stacknote.s ${o}"
+ echo ' @( $(NM_FOR_TARGET) '${SHLIB_NM_FLAGS} ${o}' | $(AWK) '\''NF == 3 { print "\t.hidden", $$3 }'\''; cat libgcc/${dir}/stacknote.s ) | $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) '${flags}' -r -nostdinc -nostdlib -o $@ '${o}' -xassembler -'
libgcc_a_objs="${libgcc_a_objs} ${oS}"
done
fi
@@ -390,10 +394,11 @@ done
echo ''
echo 'libgcc-stage-start:'
echo ' for dir in '"${dirs}"'; do \'
-echo ' if [ -d $(stage)/$$dir ]; then true; else mkdir $(stage)/$$dir; fi; \'
+echo ' if [ -d $(stage)/$$dir ]; then true; else '$mkinstalldirs' $(stage)/$$dir; fi; \'
echo ' done'
echo ' -for dir in '"${dirs}"'; do \'
echo ' mv $$dir/*'"${objext}"' $(stage)/$$dir; \'
+echo ' test ! -f $$dir/stacknote.s || mv $$dir/stacknote.s $(stage)/$$dir; \'
echo ' done'
echo ""
@@ -460,7 +465,7 @@ for ml in $MULTILIBS; do
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
if [ $dir != . ]; then
ldir='$(DESTDIR)$(libsubdir)'/$dir
- echo " if [ -d $ldir ]; then true; else mkdir $ldir; chmod a+rx $ldir; fi;"
+ echo " if [ -d $ldir ]; then true; else $mkinstalldirs $ldir; chmod a+rx $ldir; fi;"
else
ldir='$(DESTDIR)$(libsubdir)'
fi