Commit 5408ac6c by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

configure.in (in_tree_gas): Find out here whether GAS is ELF, set in_tree_gas_is_elf accordingly.

	* configure.in (in_tree_gas): Find out here whether GAS is ELF,
	set in_tree_gas_is_elf accordingly.
	(in_tree_ld): Find out whether LD emulation is ELF, set
	in_tree_ld_is_elf accordingly.
	(gcc_cv_as_subsections, gcc_cv_as_hidden, gcc_cv_as_leb128)
	(gcc_cv_as_eh_frame, gcc_cv_as_shf_merge)
	(gcc_cv_as_dwarf2_debug_line, gcc_cv_as_gdwarf2_flag)
	(gcc_cv_as_gstabs_flag): Use $in_tree_gas_is_elf instead of
	grepping gas/Makefile.
	(gcc_cv_ld_ro_rw_mix, gcc_cv_ld_eh_frame_hdr, gcc_cv_ld_pie): Use
	$in_tree_ld_is_elf instead of grepping ld/Makefile.
	* configure: Regenerate.

From-SVN: r68356
parent 8e0952f0
2003-06-23 Hans-Peter Nilsson <hp@bitrange.com>
* configure.in (in_tree_gas): Find out here whether GAS is ELF,
set in_tree_gas_is_elf accordingly.
(in_tree_ld): Find out whether LD emulation is ELF, set
in_tree_ld_is_elf accordingly.
(gcc_cv_as_subsections, gcc_cv_as_hidden, gcc_cv_as_leb128)
(gcc_cv_as_eh_frame, gcc_cv_as_shf_merge)
(gcc_cv_as_dwarf2_debug_line, gcc_cv_as_gdwarf2_flag)
(gcc_cv_as_gstabs_flag): Use $in_tree_gas_is_elf instead of
grepping gas/Makefile.
(gcc_cv_ld_ro_rw_mix, gcc_cv_ld_eh_frame_hdr, gcc_cv_ld_pie): Use
$in_tree_ld_is_elf instead of grepping ld/Makefile.
* configure: Regenerate.
2003-06-22 Roger Sayle <roger@eyesopen.com> 2003-06-22 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_builtin_mathfn_2): Use tree_cons to build * builtins.c (expand_builtin_mathfn_2): Use tree_cons to build
......
...@@ -1485,6 +1485,13 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \ ...@@ -1485,6 +1485,13 @@ elif test -f $gcc_cv_as_gas_srcdir/configure.in \
_gcc_COMPUTE_GAS_VERSION _gcc_COMPUTE_GAS_VERSION
rm -f as$host_exeext rm -f as$host_exeext
$symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
in_tree_gas_is_elf=no
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \
|| (grep 'obj_format = multi' ../gas/Makefile \
&& grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null
then
in_tree_gas_is_elf=yes
fi
fi fi
if test "x$gcc_cv_as" = x; then if test "x$gcc_cv_as" = x; then
...@@ -1580,6 +1587,11 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ ...@@ -1580,6 +1587,11 @@ elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
&& test -f ../ld/Makefile; then && test -f ../ld/Makefile; then
# Single tree build which includes ld. # Single tree build which includes ld.
in_tree_ld=yes in_tree_ld=yes
in_tree_ld_is_elf=no
if (grep 'EMUL = .*elf' ../ld/Makefile \
|| grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then
in_tree_ld_is_elf=yes
fi
for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
do do
changequote(,)dnl changequote(,)dnl
...@@ -1752,9 +1764,8 @@ AC_MSG_CHECKING(assembler subsection support) ...@@ -1752,9 +1764,8 @@ AC_MSG_CHECKING(assembler subsection support)
gcc_cv_as_subsections=no gcc_cv_as_subsections=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,9,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,9,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then test $in_tree_gas_is_elf = yes \
gcc_cv_as_subsections="working .subsection -1" && gcc_cv_as_subsections="working .subsection -1"
fi
]) ])
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
# Check if we have .subsection # Check if we have .subsection
...@@ -1811,9 +1822,7 @@ AC_MSG_CHECKING(assembler hidden support) ...@@ -1811,9 +1822,7 @@ AC_MSG_CHECKING(assembler hidden support)
gcc_cv_as_hidden=no gcc_cv_as_hidden=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,1,[ gcc_GAS_VERSION_GTE_IFELSE(2,12,1,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then test $in_tree_gas_is_elf = yes && gcc_cv_as_hidden="yes"
gcc_cv_as_hidden="yes"
fi
]) ])
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
# Check if we have .hidden # Check if we have .hidden
...@@ -1882,9 +1891,7 @@ AC_MSG_CHECKING(assembler leb128 support) ...@@ -1882,9 +1891,7 @@ AC_MSG_CHECKING(assembler leb128 support)
gcc_cv_as_leb128=no gcc_cv_as_leb128=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then test $in_tree_gas_is_elf = yes && gcc_cv_as_leb128="yes"
gcc_cv_as_leb128="yes"
fi
]) ])
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
# Check if we have .[us]leb128, and support symbol arithmetic with it. # Check if we have .[us]leb128, and support symbol arithmetic with it.
...@@ -1928,9 +1935,7 @@ AC_MSG_CHECKING(assembler eh_frame optimization) ...@@ -1928,9 +1935,7 @@ AC_MSG_CHECKING(assembler eh_frame optimization)
gcc_cv_as_eh_frame=no gcc_cv_as_eh_frame=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then test $in_tree_gas_is_elf = yes && gcc_cv_as_eh_frame="yes"
gcc_cv_as_eh_frame="yes"
fi
]) ])
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
# Check if this is GAS. # Check if this is GAS.
...@@ -2008,9 +2013,7 @@ AC_MSG_CHECKING(assembler section merging support) ...@@ -2008,9 +2013,7 @@ AC_MSG_CHECKING(assembler section merging support)
gcc_cv_as_shf_merge=no gcc_cv_as_shf_merge=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,12,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then test $in_tree_gas_is_elf = yes && gcc_cv_as_shf_merge="yes"
gcc_cv_as_shf_merge=yes
fi
]) ])
elif test x$gcc_cv_as != x; then elif test x$gcc_cv_as != x; then
# Check if we support SHF_MERGE sections # Check if we support SHF_MERGE sections
...@@ -2486,10 +2489,8 @@ case "$target" in ...@@ -2486,10 +2489,8 @@ case "$target" in
esac esac
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& test x"$insn" != x ; then && gcc_cv_as_dwarf2_debug_line="yes"
gcc_cv_as_dwarf2_debug_line="yes"
fi
]) ])
elif test x$gcc_cv_as != x -a x"$insn" != x ; then elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo ' .file 1 "conftest.s"' > conftest.s echo ' .file 1 "conftest.s"' > conftest.s
...@@ -2524,10 +2525,8 @@ AC_MSG_CHECKING(assembler --gdwarf2 support) ...@@ -2524,10 +2525,8 @@ AC_MSG_CHECKING(assembler --gdwarf2 support)
gcc_cv_as_gdwarf2_flag=no gcc_cv_as_gdwarf2_flag=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& test x"$insn" != x ; then && gcc_cv_as_gdwarf2_flag="yes"
gcc_cv_as_gdwarf2_flag="yes"
fi
]) ])
elif test x$gcc_cv_as != x -a x"$insn" != x ; then elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s echo '' > conftest.s
...@@ -2548,10 +2547,8 @@ AC_MSG_CHECKING(assembler --gstabs support) ...@@ -2548,10 +2547,8 @@ AC_MSG_CHECKING(assembler --gstabs support)
gcc_cv_as_gstabs_flag=no gcc_cv_as_gstabs_flag=no
if test $in_tree_gas = yes ; then if test $in_tree_gas = yes ; then
gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[ gcc_GAS_VERSION_GTE_IFELSE(2,11,0,[
if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ test $in_tree_gas_is_elf = yes && test x"$insn" != x \
&& test x"$insn" != x ; then && gcc_cv_as_gstabs_flag="yes"
gcc_cv_as_gstabs_flag="yes"
fi
]) ])
elif test x$gcc_cv_as != x -a x"$insn" != x ; then elif test x$gcc_cv_as != x -a x"$insn" != x ; then
echo '' > conftest.s echo '' > conftest.s
...@@ -2577,7 +2574,8 @@ AC_MSG_RESULT($gcc_cv_as_gstabs_flag) ...@@ -2577,7 +2574,8 @@ AC_MSG_RESULT($gcc_cv_as_gstabs_flag)
AC_MSG_CHECKING(linker read-only and read-write section mixing) AC_MSG_CHECKING(linker read-only and read-write section mixing)
gcc_cv_ld_ro_rw_mix=unknown gcc_cv_ld_ro_rw_mix=unknown
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_ro_rw_mix=read-write gcc_cv_ld_ro_rw_mix=read-write
fi fi
elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then
...@@ -2615,7 +2613,8 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix) ...@@ -2615,7 +2613,8 @@ AC_MSG_RESULT($gcc_cv_ld_ro_rw_mix)
AC_MSG_CHECKING(linker PT_GNU_EH_FRAME support) AC_MSG_CHECKING(linker PT_GNU_EH_FRAME support)
gcc_cv_ld_eh_frame_hdr=no gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_eh_frame_hdr=yes gcc_cv_ld_eh_frame_hdr=yes
fi fi
elif test x$gcc_cv_ld != x; then elif test x$gcc_cv_ld != x; then
...@@ -2633,7 +2632,8 @@ AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) ...@@ -2633,7 +2632,8 @@ AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr)
AC_MSG_CHECKING(linker position independent executable support) AC_MSG_CHECKING(linker position independent executable support)
gcc_cv_ld_pie=no gcc_cv_ld_pie=no
if test $in_tree_ld = yes ; then if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 15 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_pie=yes gcc_cv_ld_pie=yes
fi fi
elif test x$gcc_cv_ld != x; then elif test x$gcc_cv_ld != x; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment