Commit 704a6306 by Richard Henderson Committed by Jim Wilson

Patch from Richard Henderson to fix alpha-linux support.

	* alpha/elf.h (LINK_SPEC): Conditionalize on USE_GNULIBC_1.
	* config.guess: Recognize alpha-linux-gnulibc1.
	* configure.in (alpha-*-linux-gnulibc1): New target.
	(alpha-*-linux-gnu*): Don't build crtbegin/end.

From-SVN: r14974
parent f345de42
Wed Aug 27 15:49:12 1997 Richard Henderson <rth@cygnus.com>
* alpha/elf.h (LINK_SPEC): Conditionalize on USE_GNULIBC_1.
* config.guess: Recognize alpha-linux-gnulibc1.
* configure.in (alpha-*-linux-gnulibc1): New target.
(alpha-*-linux-gnu*): Don't build crtbegin/end.
Wed Aug 27 11:52:58 1997 Jim Wilson <wilson@cygnus.com> Wed Aug 27 11:52:58 1997 Jim Wilson <wilson@cygnus.com>
* m68k.md (iorsi3_internal): Readd ! TARGET_5200 check lost in * m68k.md (iorsi3_internal): Readd ! TARGET_5200 check lost in
......
...@@ -506,6 +506,7 @@ EOF ...@@ -506,6 +506,7 @@ EOF
ret \$31,(\$26),1 ret \$31,(\$26),1
.end main .end main
EOF EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null ${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then if test "$?" = 0 ; then
./dummy ./dummy
...@@ -516,10 +517,16 @@ EOF ...@@ -516,10 +517,16 @@ EOF
2) 2)
UNAME_MACHINE="alphaev56" UNAME_MACHINE="alphaev56"
;; ;;
esac esac
fi
rm -f dummy.s dummy objdump --private-headers dummy | \
echo ${UNAME_MACHINE}-unknown-linux-gnu ; exit 0 grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF cat >dummy.c <<EOF
main(argc, argv) main(argc, argv)
......
...@@ -39,6 +39,15 @@ Currently only Linux uses this. */ ...@@ -39,6 +39,15 @@ Currently only Linux uses this. */
-Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__ELF__" -Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__ELF__"
#undef LINK_SPEC #undef LINK_SPEC
#ifdef USE_GNULIBC_1
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
%{static:-static}}"
#else
#define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \ #define LINK_SPEC "-m elf64alpha -G 8 %{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \ %{shared:-shared} \
%{!shared: \ %{!shared: \
...@@ -46,6 +55,7 @@ Currently only Linux uses this. */ ...@@ -46,6 +55,7 @@ Currently only Linux uses this. */
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}" %{static:-static}}"
#endif
/* Output at beginning of assembler file. */ /* Output at beginning of assembler file. */
......
...@@ -273,15 +273,25 @@ for machine in $build $host $target; do ...@@ -273,15 +273,25 @@ for machine in $build $host $target; do
fixincludes=Makefile.in fixincludes=Makefile.in
gas=yes gnu_ld=yes gas=yes gnu_ld=yes
;; ;;
alpha*-*-linux-gnulibc1*)
tm_file="${tm_file} alpha/linux.h alpha/elf.h"
xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
xmake_file=none
fixincludes=Makefile.in
gas=yes gnu_ld=yes
if [[ x$enable_threads = xyes ]]; then
thread_file='posix'
fi
;;
alpha*-*-linux-gnu*) alpha*-*-linux-gnu*)
tm_file="${tm_file} alpha/linux.h alpha/elf.h" tm_file="${tm_file} alpha/linux.h alpha/elf.h"
xm_file="${xm_file} alpha/xm-linux.h" xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS" target_cpu_default="MASK_GAS"
gas=no
tmake_file="t-linux alpha/t-linux" tmake_file="t-linux alpha/t-linux"
xmake_file=none xmake_file=none
fixincludes=Makefile.in fixincludes=Makefile.in
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gas=yes gnu_ld=yes gas=yes gnu_ld=yes
if [[ x$enable_threads = xyes ]]; then if [[ x$enable_threads = xyes ]]; then
thread_file='posix' thread_file='posix'
......
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