This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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: [RFA] Change how CC, CFLAGS get set


Christopher Faylor wrote:
On Mon, Jun 28, 2004 at 08:31:14PM -0400, Jeff Johnston wrote:

I have a number of concerns with the patch you have submitted, but no objections to the concept.

First of all, if you go around changing acinclude.m4, then "all" aclocal.m4 files and configure files have to be regenerated in the newlib directory.

Second, if you can, please use aclocal-1.4-p6 so as to minimize changes being introduced.


I'll try to track that version down.


Thirdly, the code moved to acinclude.m4 won't work for lower level directories because it is using `pwd` which will change the targ-include directory every time.


Isn't newlib_basedir set to the top level of newlib by every package?
It sure seems like that is what is going on in all of the sub-configures.

If so, then this:

abs_newlib_basedir=`cd ${newlib_basedir} && pwd`

should always equate to the same thing no matter where it's run.  In
the subjdirectories, it will just get rid of trailing ..'s which bring
you back to the top.


+# These get added in the top-level configure.in, except in the case where
+# newlib is being built natively.
+LIBC_INCLUDE_GREP=`echo ${CC} | grep \/libc\/include`
+abs_newlib_basedir=`cd ${newlib_basedir} && pwd`
+if test -z "${LIBC_INCLUDE_GREP}"; then
+ newlib_cflags="$newlib_cflags -I$PWD/targ-include -I${abs_newlib_basedir}/libc/include"
+fi


My apologies. I meant the $PWD that is used just prior to targ-include. That doesn't work. The abs_newlib_basedir is the source directory. You need to point to the one targ-include in the build directory.

cgf


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