ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] [PATCH] Fix colilo build when using fully relocatable toolchains.


From: Carlos O'Donell
Subject: [Ltib] [PATCH] Fix colilo build when using fully relocatable toolchains.
Date: Wed, 6 Dec 2006 23:31:00 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

Stuart, Matt,

When compiling with a fully relocatable toolchain colilo fails to compile.

The variable GCC_EXEC_PREFIX has a special meaning to the compiler, see:
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Environment-Variables.html#Environment-Variables

If care is not taken with GCC_EXEC_PREFIX the compiler may fail to find
cc1. It would be best in the case of colilo to avoid GCC_EXEC_PREFIX and
use TOOLCHAIN_PREFIX instead.

The following patch fixed colilo build failures when compiling with
CodeSourcery's Sourcery G++ Coldfire GNU/Linux toolchain. The
CodeSourcery toolchains are fully relocatable toolchains i.e. you can
put them anywhere, and they honour the GCC_EXEC_PREFIX environment
variable.

The ltib FAQ was indispensible, in particular "How do I make changes to
a package and capture them" was very useful!

What sort of patches / diffs / testing are you looking for?

It appears this patch just applies ontop of the existing colilo pathes
and would get added to the colilo.spec file?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
address@hidden
(650) 331-3385 x716

diff --exclude CVS -uNr colilo/Makefile colilo.modified/Makefile
--- colilo/Makefile     2006-12-06 21:55:13.000000000 -0500
+++ colilo.modified/Makefile    2006-12-06 21:53:25.000000000 -0500
@@ -65,15 +65,13 @@
 #
 #CF_ROOT = /usr/local/lib/gcc-lib/m68k-elf/2.95.3
 CF_ROOT = /opt/toolchain/cross-tools/lib
-#GCC_EXEC_PREFIX = /usr/local/bin/m68k-elf-
-#GCC_EXEC_PREFIX = m68k-linux-
-GCC_EXEC_PREFIX = $(TOOLCHAIN_PREFIX)
-
-CC = $(GCC_EXEC_PREFIX)gcc
-AS = $(GCC_EXEC_PREFIX)as
-LD = $(GCC_EXEC_PREFIX)ld
-AR = $(GCC_EXEC_PREFIX)ar
-OBJCOPY = $(GCC_EXEC_PREFIX)objcopy
+
+# Use the TOOLCHAIN_PREFIX env var.
+CC = $(TOOLCHAIN_PREFIX)gcc
+AS = $(TOOLCHAIN_PREFIX)as
+LD = $(TOOLCHAIN_PREFIX)ld
+AR = $(TOOLCHAIN_PREFIX)ar
+OBJCOPY = $(TOOLCHAIN_PREFIX)objcopy
 
 SOURCE_DIR = $(shell pwd)
 ARCH_DIR = $(SOURCE_DIR)/arch/$(ARCH)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]