crossgcc for mips-redhat-linux-gnu
Toralf Lund
toralf@procaptura.com
Fri Mar 19 15:12:00 GMT 2004
Chris Jones wrote:
>Toralf;
>
>On Thu, Mar 18, 2004 at 01:51:19PM +0100, Toralf Lund wrote:
>
>
>>rpmbuild --rebuild --target=mips-linux-gnu --define "_host
>>mips-linux-gnu" -define "_build i686-pc-linux-gnu" ./x.src.rpm
>>
>>- Toralf
>>
>>
>>
>
>This now sets up the proper target, host and build variables on the
>configure line. Thanks, I should have known to do this, but at the same
>time defining the --target variable should set these up as you
>described, IMHO.
>
>
Yes. The problem is that the default macro setup (for i686 Linux) has
%_build %{_host}
%_host i686-pc-linux-gnu
%_target %{_host}
This is consistent with the way configure itself usually defaults
variables, but doesn't seem logical in the context of --target;
something like
%_build i686-pc-linux-gnu
%_target %{_build}
%_host %{_target}
would probably be better. Or maybe rpmbuild ought to have separate
"--host" and "--build" options...
Another question is why configure distinguises between "host" and
"target" in the first place, since you usually need only two system type
values even when cross compiling.
>There remains one problem.
>I would like to avoid touching the .spec files if possible.
>Currently I still have to set the following variable inside the .spec:
>
>CFLAGS=-I/opt/crosstool/mips-redhat-linux-gnu/gcc-3.2.3-glibc-2.2.3/mips-redhat-linux-gnu/include
>
>It would be a saving grace if I could either set this last variable from
>the command line, or somehow get the environment to pick it up.
>
>Ideas?
>
>
Not really. Unless it's as simple as doing "setenv CFLAGS ..." or
"export CFLAGS=..." before executing rpmbuild...
- Toralf
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list