This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: [Fwd: passing option to makefile via RPM-Spec]


In article <14023.609.290357.409579@saturn.hollstein.net> you write:
> > cd %{OBJDIR}
> > CFLAGS="-O2 -g -fno-vtable-thunks" <--- this I entered!!!

>You forgot to "export" the CFLAGS variable: add

>export CFLAGS

> > $RPM_BUILD_DIR/egcs-$RPM_PACKAGE_VERSION/configure -v --prefix=/usr \
> >         --enable-shared --enable-threads \
> >         $RPM_ARCH-redhat-linux

To clarify, there are two /bin/sh constructions. Either
VAR1=value1 VAR2=value2 command
which is ONE command which will execute with the right values for the
variables, or, when you want stuff to stick around, you must use
separate statements with export, as in
VAR1=value1; VAR2=value2; export VAR1 VAR2; command

One can easily mistake one form for the other and forget some export
later on if one gets confused about what's going on. :)


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