This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

can build toolchain in two steps, but not one


  ok, i've sort of isolated an error that's causing me grief and it
might either cause more general problems than just for my combination,
or i could just be an idiot.

  once again, trying to build sh3eb toolchain with the absolute latest
and greatest parts (including an SH-ified 2.6.13 kernel source tree).
i can build the toolchain *and* compile the kernel if i do it in
stages:

  * build the toolchain using the sanitized headers (no kernel source)
  * augment PATH to include new toolchain executables
  * export CROSS_COMPILE=sh3eb-unknown-linux-gnu-
  * configure kernel source tree with fairly generic config file
  * go to top of kernel source tree and "make ARCH=sh zImage"

the above works just fine, so we know it can be done in stages.

(SIDE NOTE:  previously, to select sh3eb, i had the following line in
the .dat file:

	TARGET_CFLAGS="-O -m3 -mb"

however, based on this excerpt from arch/sh/Makefile:

	cflags-y                                := -mb
	cflags-$(CONFIG_CPU_LITTLE_ENDIAN)      := -ml
	...
	cflags-$(CONFIG_CPU_SH3)                += -m3

it appears that i can delete those two -m flags and it won't make any
difference, so i dropped them and it still worked.)

  now, since it can be done in stages, i tried to do it all at once.
i changed the crosstool config files to point at the kernel source
tree and the kernel config file.  i also (could this have been a
mistake?) unset CROSS_COMPILE and removed the crosstool bin directory
from PATH, and started the build.

  after a short while (and about 60,000 lines of output), i got the
following error:

...
+ KERNEL_PATCHLEVEL=6
+ case "$KERNEL_VERSION.$KERNEL_PATCHLEVEL.x" in
+ case $ARCH in
+ make ARCH=sh prepare include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC      scripts/mod/empty.o
cc1: error: invalid option â'b'
cc1: error: invalid option â'3'
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2


  what that tells me is that the perfectly valid SH3 options -mb and
-m3 are unrecognized, which further suggests that the wrong compiler
is being used since it doesn't recognize SH3-specific options.

  what have i misunderstood here?  how are those option settings
getting in the way, because that's clearly what's happening.

  thoughts?

rday

p.s.  uh oh ... i think i have a glimmer ...
------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

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