httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovies Brabson <ovi...@us.ibm.com>
Subject Important: TestCompile and c89 argument order
Date Thu, 16 Dec 1999 19:47:31 GMT
> Hi,
>
> After a couple of days of testing, I found the first difficulties with
> this change in helpers/TestCompile which I committed recently as part
> of the IBM OS/390 patch:
>     diff -p -u -r1.34 -r1.35
>     --- apache-1.3/src/helpers/TestCompile  1999/07/21 14:32:55     1.34
>     +++ /home/cvs/apache-1.3/src/helpers/TestCompile        1999/12/09 17:19:42     1.35
>     @@ -200,10 +201,10 @@ INCLUDES=\$(INCLUDES1) \$(EXTRA_INCLUDES
>      LDFLAGS=\$(LDFLAGS1) \$(EXTRA_LDFLAGS)
>
>      dummy:
>     -       cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/dummy.c -o helpers/dummy
$TLIB \$(LIBS)
>     +       cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) -o helpers/dummy $TLIB
\$(LIBS) helpers/dummy.c
>
>      testfunc:
>     -       cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) helpers/testfunc.c -o helpers/testfunc
$TLIB \$(LIBS)
>     +       cd ..; \$(CC) \$(CFLAGS) \$(INCLUDES) \$(LDFLAGS) -o helpers/testfunc $TLIB
\$(LIBS) helpers/testfunc.c
>      EOF
>
> As you can see, the former argument order
>
>   c89 helpers/testfunc.c -o helpers/testfunc $TLIB \$(LIBS)
>
> was changed to
>
>   c89 -o helpers/testfunc $TLIB \$(LIBS) helpers/testfunc.c
>
> While I don't have problems with the "-o outname" appearing *before*
> the input source file, my compiler DOES care about the library names
> (-L/lib -lblah) appearing before, not after, the source name. My
> compiler is a c89 (but made by Siemens, not by IBM), and it insists on
> treating its source, object and library arguments left-to-right, which
> makes sense IMHO.
>
> I don't know if Unix98 requires that a c89 handle $(LIBS) before the
> sources, but at least I know that few people use c89 (most use cc, and
> cc is NOT required to accept this).
>
> So IMO....
>
> a)  this change should be reverted BEFORE 1.3.10 (lest we intend to
>     fail on cc-only machines)
>     and
> b)  IBMers should write a wrapper around their c89 to reorder the
>     arguments (I have written one for our compiler as well ;-)
>
> What do you think?
>
>     Martin
>
Sounds good.  I'll put together a wrapper for OS/390 and submit a patch.


Mime
View raw message