This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pre-egcs 1.1 status for *-rtems
- To: law at cygnus dot com
- Subject: Re: pre-egcs 1.1 status for *-rtems
- From: Joel Sherrill <joel at OARcorp dot com>
- Date: Tue, 14 Jul 1998 12:28:52 -0500 (CDT)
- cc: egcs at cygnus dot com
On Tue, 14 Jul 1998, Jeffrey A Law wrote:
> Ouch. This is not going to work if you use relative pathnames when
> configuring. I believe it will work if you use absolute pathnames.
Sounds like something to mention in the crossgcc stuff. I think by
default one-tree.sh uses relative paths.
> Ought to fail. What shell are you using? It sounds like it's being
> "overly helpful" and is confusing the issue in this case.
bash. What else would a GNU true believer use? ;)
> I believe if you use an absolute pathname for configure that this
> will work.
Hmmm... This might but I think I like the next solution better since it
should let the existing one-tree scripts work.
> The other possibility would be to change how configure.in finds the
> assembler directory.
>
> When you enter the code in configure.in, srcdir looks like
>
> ../../src/gcc
>
> What would be the natural way to get to its parent? "..", then we
> descent down to the assembler via "gas". That's how we end up with
> ../../src/gcc/../gas
Yes this is natural but broken for symlinks.
> We could instead use some kind of sed hack to strip off the last
> component of the pathname, then append "/gas". Presumably something
> like :/gcc$:/gas: ought to work reliably.
I just tried this one and .... got a bit further. It looks like the
version string is actually in configure and the generated Makefile though
for binutils 2.9.1. I did not fix this part since I do not know where the
version info should be.
Here is a piece of the output of "sh -x configure ..." which shows it
missing the VERSION string:
++ sed -e s,gcc$,gas,
+ gcc_cv_as_gas_srcdir=../../src/gas
+ [ -x as ]
+ [ -f ../../src/gas/configure.in ]
++ grep ^VERSION=[0-9]*\.[0-9]* ../../src/gas/configure.in
+ gcc_cv_gas_version=
+ [ x != x ]
++ grep ^VERSION=[0-9]*\.[0-9]* ../../src/gas/Makefile.in
+ gcc_cv_gas_version=
+ [ x != x ]
++ expr : VERSION=\([0-9]*\)
+ gcc_cv_gas_major_version=
++ expr : VERSION=[0-9]*\.\([0-9]*\)
+ gcc_cv_gas_minor_version=
+ [ -eq 2 -a -ge 6 -o -gt 2 ]
../../src/gcc/configure: [: integer expression expected before -eq
+ [ -eq 2 -a -ge 8 -o -gt 2 ]
../../src/gcc/configure: [: integer expression expected before -eq
+ [ x != x ]
+ echo
Below my signature is a patch which I think shows how I put the sed in
configure.in. I think this will work once the code reliably is looking at
the file which really has the version info in it. :)
--joel
*** ../../../original/egcs-19980628/gcc/configure.in Fri Jun 26 12:07:28 1998
--- configure.in Tue Jul 14 12:33:29 1998
***************
*** 3297,3308 ****
AC_MSG_CHECKING(assembler alignment features)
gcc_cv_as=
gcc_cv_as_alignment_features=
if [[ -x as$host_exeext ]]; then
# Build using assembler in the current directory.
gcc_cv_as=./as$host_exeext
! elif [[ -f $srcdir/../gas/configure.in ]]; then
# Single tree build which includes gas.
! for f in $srcdir/../gas/configure.in $srcdir/../gas/Makefile.in
do
gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
if [[ x$gcc_cv_gas_version != x ]]; then
--- 3302,3314 ----
AC_MSG_CHECKING(assembler alignment features)
gcc_cv_as=
gcc_cv_as_alignment_features=
+ gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'`
if [[ -x as$host_exeext ]]; then
# Build using assembler in the current directory.
gcc_cv_as=./as$host_exeext
! elif [[ -f $gcc_cv_as_gas_srcdir/configure.in ]]; then
# Single tree build which includes gas.
! for f in $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
do
gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
if [[ x$gcc_cv_gas_version != x ]]; then