mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-29 06:50:32 +00:00
Changes to make an installed cross-compiler find everything correctly.
Tue Sep 15 16:00:54 1992 Ian Lance Taylor (ian@cygnus.com) * configure: always set $(tooldir) to $(libdir)/$(target_alias), even for a native compilation.
This commit is contained in:
parent
866e23d055
commit
c51083226c
@ -1,3 +1,8 @@
|
||||
Tue Sep 15 16:00:54 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* configure: always set $(tooldir) to $(libdir)/$(target_alias),
|
||||
even for a native compilation.
|
||||
|
||||
Thu Sep 10 10:43:19 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* Makefile.in: added -I for newlib/targ-include to XTRAFLAGS, to
|
||||
|
77
configure
vendored
77
configure
vendored
@ -66,7 +66,11 @@ norecursion=
|
||||
prefix=/usr/local
|
||||
progname=
|
||||
program_prefix=
|
||||
program_prefix_option=
|
||||
program_prefixoption=
|
||||
program_suffix=
|
||||
program_suffixoption=
|
||||
program_transform_name=
|
||||
program_transform_nameoption=
|
||||
redirect=">/dev/null"
|
||||
removing=
|
||||
site=
|
||||
@ -117,6 +121,15 @@ do
|
||||
program_prefix=${arg}
|
||||
program_prefixoption="-program_prefix=${program_prefix}"
|
||||
next_program_prefix=
|
||||
elif [ -n "${next_program_suffix}" ] ; then
|
||||
program_suffix=${arg}
|
||||
program_suffixoption="-program_suffix=${program_suffix}"
|
||||
next_program_suffix=
|
||||
elif [ -n "${next_program_transform_name}" ] ; then
|
||||
# Double any backslashes or dollar signs in the argument
|
||||
program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
|
||||
program_transform_nameoption="${program_transform_nameoption} -program_transform_name='${arg}'"
|
||||
next_program_transform_name=
|
||||
elif [ -n "${next_target}" ] ; then
|
||||
next_target=
|
||||
case "${target_alias}" in
|
||||
@ -173,13 +186,28 @@ do
|
||||
next_prefix=yes
|
||||
;;
|
||||
-rm | --rm) removing=${arg} ;;
|
||||
-program_prefix=* | --program_prefix=* | --program_prefi=* | --program_pref=* | --program_pre=* | --program_pr=* | --program_p=* | --program_=* | --program=* | --progra=* | --progr=* | --prog=* | --pro=*)
|
||||
program_prefix=`echo ${arg} | sed 's/^[-a-z]*=//'`
|
||||
-program_prefix=* | --program_prefix=* | --program_prefi=* | --program_pref=* | --program_pre=* | --program_pr=* | --program_p=*)
|
||||
program_prefix=`echo ${arg} | sed 's/^[-a-z_]*=//'`
|
||||
program_prefixoption=${arg}
|
||||
;;
|
||||
-program_prefix | --program_prefix | --program_prefi | --program_pref | --program_pre | --program_pr | --program_p | --program_ | --program | --progra | --progr | --prog | --pro)
|
||||
-program_prefix | --program_prefix | --program_prefi | --program_pref | --program_pre | --program_pr | --program_p)
|
||||
next_program_prefix=yes
|
||||
;;
|
||||
-program_suffix=* | --program_suffix=* | --program_suffi=* | --program_suff=* | --program_suf=* | --program_su=* | --program_s=*)
|
||||
program_suffix=`echo ${arg} | sed 's/^[-a-z_]*=//'`
|
||||
program_suffixoption=${arg}
|
||||
;;
|
||||
-program_suffix | --program_suffix | --program_suffi | --program_suff | --program_suf | --program_su | --program_s )
|
||||
next_program_suffix=yes
|
||||
;;
|
||||
-program_transform_name=* | --program_transform_name=* | --program_transform_nam=* | --program_transform_na=* | --program_transform_n=* | --program_transform_=* | --program_transform=* | --program_transfor=* | --program_transfo=* | --program_transf=* | --program_trans=* | --program_tran=* | --program_tra=* | --program_tr=* | --program_t=*)
|
||||
# Double any \ or $ in the argument
|
||||
program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/^[-a-z_]*=//' -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
|
||||
program_transform_nameoption="${program_transform_nameoption} -program_transform_name='`echo ${arg} | sed 's/^[-a-z_]*=//'`'"
|
||||
;;
|
||||
-program_transform_name | --program_transform_name | --program_transform_nam | --program_transform_na | --program_transform_n | --program_transform_ | --program_transform | --program_transfor | --program_transfo | --program_transf | --program_trans | --program_tran | --program_tra | --program_tr | --program_t)
|
||||
next_program_transform_name=yes
|
||||
;;
|
||||
-site=* | --site=* | --sit=* | --si=*)
|
||||
site_option=${arg}
|
||||
site=`echo ${arg} | sed 's/^[-a-z]*=//'`
|
||||
@ -303,6 +331,8 @@ if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
|
||||
echo " -norecursion configure this directory only. [recurse]" ;
|
||||
echo " -prefix=MYDIR configure for installation of host dependent files into MYDIR. [\"/usr/local\"]" ;
|
||||
echo " -program_prefix=FOO install programs with FOO prepended to their names. [ \"\" ]" ;
|
||||
echo " -program_suffix=FOO install programs with FOO appended to their names. [ \"\" ]" ;
|
||||
echo " -program_transform_name=FOO install programs with names transformed by sed pattern FOO. [ \"\" ]" ;
|
||||
echo " -site=SITE configure with site specific makefile for SITE" ;
|
||||
echo " -srcdir=DIR find the sources in DIR. [\".\" or \"..\"]" ;
|
||||
echo " -target=TARGET configure for TARGET. [TARGET = HOST]" ;
|
||||
@ -460,6 +490,28 @@ if [ ! -r ${srcdir}/${srctrigger} ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tooldir="\$(libdir)/${target_alias}"
|
||||
|
||||
if [ "${host_alias}" != "${target_alias}" ] ; then
|
||||
if [ "${program_prefix}" = "" ] ; then
|
||||
if [ "${program_suffix}" = "" ] ; then
|
||||
if [ "${program_transform_name}" = "" ] ; then
|
||||
program_prefix=${target_alias}- ;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Merge program_prefix and program_suffix onto program_transform_name
|
||||
# Use a double $ so that make ignores it
|
||||
if [ "${program_suffix}" != "" ] ; then
|
||||
program_transform_name="-e s/\$\$/${program_suffix}/ ${program_transform_name}"
|
||||
fi
|
||||
|
||||
if [ "${program_prefix}" != "" ] ; then
|
||||
program_transform_name="-e s/^/${program_prefix}/ ${program_transform_name}"
|
||||
fi
|
||||
|
||||
for subdir in . ${subdirs} ; do
|
||||
|
||||
# ${subdir} is relative path from . to the directory we're currently
|
||||
@ -557,7 +609,7 @@ EOF
|
||||
# so do these separately because I don't trust the order of sed -e expressions.
|
||||
|
||||
# Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
|
||||
rm -f Makefile.tem
|
||||
rm -f ${subdir}/Makefile.tem
|
||||
case "${site}" in
|
||||
"") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
|
||||
*)
|
||||
@ -593,7 +645,7 @@ EOF
|
||||
# working copy now in ${Makefile}
|
||||
|
||||
# Conditionalize the makefile for this target.
|
||||
rm -f Makefile.tem
|
||||
rm -f ${subdir}/Makefile.tem
|
||||
case "${target_makefile_frag}" in
|
||||
"") mv ${Makefile} ${subdir}/Makefile.tem ;;
|
||||
*)
|
||||
@ -649,27 +701,22 @@ EOF
|
||||
# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
|
||||
case "${host_alias}" in
|
||||
"${target_alias}")
|
||||
tooldir='$(libdir)'
|
||||
echo "ALL=all.internal" >> ${Makefile}
|
||||
;;
|
||||
*)
|
||||
echo "CROSS=-DCROSS_COMPILE" >> ${Makefile}
|
||||
echo "ALL=all.cross" >> ${Makefile}
|
||||
case "${program_prefix}" in
|
||||
"") program_prefix=${target_alias}- ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
tooldir="\$(libdir)/${target_alias}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
|
||||
# remove any form feeds.
|
||||
if [ -z "${subdirs}" ]; then
|
||||
rm -f ${subdir}/Makefile.tem2
|
||||
sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \
|
||||
-e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
|
||||
${subdir}/Makefile.tem > ${subdir}/Makefile.tem2
|
||||
rm -f ${subdir}/Makefile.tem
|
||||
mv ${subdir}/Makefile.tem2 ${subdir}/Makefile.tem
|
||||
fi
|
||||
sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
|
||||
@ -677,6 +724,8 @@ EOF
|
||||
-e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
|
||||
-e "s///" \
|
||||
-e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \
|
||||
-e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \
|
||||
-e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \
|
||||
-e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \
|
||||
${subdir}/Makefile.tem >> ${Makefile}
|
||||
# final copy now in ${Makefile}
|
||||
@ -783,7 +832,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
|
||||
### The recursion line is here.
|
||||
if eval ${recprog} ${verbose} ${host_alias} -target=${target_alias} \
|
||||
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
|
||||
${srcdiroption} ${program_prefixoption} ${site_option} ${removing} ${redirect} ; then
|
||||
${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${removing} ${redirect} ; then
|
||||
true
|
||||
else
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user