This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mknetrel issues

On Sun, 15 Jun 2003, Max Bowsher wrote:

> Christopher Faylor wrote:
> > On Sat, Jun 14, 2003 at 10:43:44PM +0100, Max Bowsher wrote:
> >> I've been trying to use mknetrel (natively on Cygwin) to build myself a
> >> gcc-3.3.
> >>
> >> I ran into a variety of small issues:
> ...
> >> 2) Use of $(BASE_FLAGS_TO_PASS) and $(EXTRA_HOST_FLAGS)
> >> I'm guessing these are intended to be make variables, but the quotes are
> >> getting lost prematurely, and they are being interpreted by bash as $()
> >> command interpolation.
> >
> > The parentheses should be dropped.  I never use these variables, so that's
> > why I never noticed the makefile-like usage.
> There is still something wrong with the quoting here:
> Making net release for gcc-3.3-max, pid 2748
> make[1]: Entering directory `/netrel/build/gcc-3.3-max/libiberty'
> make[1]: *** No rule to make target `ASE_FLAGS_TO_PASS'.  Stop.
> make[1]: Leaving directory `/netrel/build/gcc-3.3-max/libiberty'
> make: *** [all-libiberty] Error 2
> Since I don't understand what's supposed to happen, I'm going to avoid the
> issue by removing all the needdevoflags stuff.
> [snip]

This is again a quoting issue.  The variables are single-quoted in the
argument to the addmakeflags command, and they are also single quoted
later in eval.  Thus, they never got a chance to be expanded, and are
passed to "make" as-is.  Make sees the '$' signs, and treats them as make
variables.  Before, with the parentheses, it attempted to expand whole
variables, now that the parentheses aren't there, make snips off the first
character.  I suspect that this is not what's intended, but couldn't find
a place where this is set, so perhaps CGF can explain what these variables
are supposed to be used for.

Looking at the commented out make invocation below the "eval make ..."
(the original, I assume), it has the same problem as the "eval" argument,
so this has been around since version 1.10 at least.

If I had to take a guess, I'd say that this could be fixed by changing the
single quotes around $BASE_FLAGS_TO_PASS (and $EXTRA_{TARGET|HOST}_FLAGS)
to double quotes, same way they are specified for $TARGET_FLAGS_TO_PASS...

BTW, the bug in the gcc script can be fixed by the patch below.
RCS file: /cvs/cygwin-apps/mknetrel/extra/gcc,v
retrieving revision 1.5
diff -u -p -r1.5 gcc
--- gcc 10 Mar 2003 05:35:57 -0000      1.5
+++ gcc 15 Jun 2003 01:41:58 -0000
@@ -7,7 +7,7 @@ prebuild() {
     mkdir -p i686-pc-cygwin
     grep ac_cv_file__proc_self_exe i686-pc-cygwin/config.cache >/dev/null 2>&1 ||\
     echo 'ac_cv_file__proc_self_exe=${ac_cv_file__proc_self_exe=no}' >> i686-pc-cygwin/config.cache
-    addmakeflags 'GCJ=i686-pc-cygwin-gcj' 'GCJH=i686-pc-cygwin-gcjh' # assumes cross compilation
+    addmakeflags 'GCJ=i686-pc-cygwin-gcj' ' ' 'GCJH=i686-pc-cygwin-gcjh' # assumes cross compilation
     sedit 's/linux-gnu/linux/g' gcc/Makefile '*' :

      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]