[OpenBIOS] r66 - in openbios-devel: . config/examples kernel
svn@openbios.org
svn at openbios.org
Tue Jul 18 23:35:55 CEST 2006
Author: stepan
Date: 2006-07-18 23:35:55 +0200 (Tue, 18 Jul 2006)
New Revision: 66
Modified:
openbios-devel/Makefile
openbios-devel/config/examples/amd64_rules.xml
openbios-devel/config/examples/cross-ppc_rules.xml
openbios-devel/config/examples/cross-sparc32_rules.xml
openbios-devel/config/examples/cross-sparc64_rules.xml
openbios-devel/config/examples/sparc32_rules.xml
openbios-devel/config/examples/sparc64_rules.xml
openbios-devel/config/examples/x86_rules.xml
openbios-devel/kernel/cross.h
Log:
Automatic cross-compiler flags
Detect cross-compiling flags (CROSSCFLAGS) automatically based on endian
and word size differences.
Modified: openbios-devel/Makefile
===================================================================
--- openbios-devel/Makefile 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/Makefile 2006-07-18 21:35:55 UTC (rev 66)
@@ -1,5 +1,6 @@
ARCH= $(shell cat rules.xml |grep "^ARCH" |cut -d\= -f2|tr -d \ )
HOSTARCH=$(shell config/scripts/archname)
+CROSSCFLAGS=$(shell config/scripts/crosscflags $(HOSTARCH) $(ARCH))
ODIR=obj-$(ARCH)
all: info build
@@ -53,12 +54,12 @@
build: xml
@printf "Building..."
- @( $(MAKE) -f $(ODIR)/Makefile > $(ODIR)/build.log 2>&1 && echo "ok." ) || \
+ @( $(MAKE) -f $(ODIR)/Makefile CROSSCFLAGS=$(CROSSCFLAGS) > $(ODIR)/build.log 2>&1 && echo "ok." ) || \
( echo "error:"; tail -15 $(ODIR)/build.log )
build-verbose:
@echo "Building..."
- $(MAKE) -f $(ODIR)/Makefile
+ $(MAKE) -f $(ODIR)/Makefile "CROSSCFLAGS=$(CROSSCFLAGS)"
run:
@echo "Running..."
Modified: openbios-devel/config/examples/amd64_rules.xml
===================================================================
--- openbios-devel/config/examples/amd64_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/amd64_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := amd64
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
HOSTCFLAGS := -O -g -fprofile-arcs -ftest-coverage -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/config/examples/cross-ppc_rules.xml
===================================================================
--- openbios-devel/config/examples/cross-ppc_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/cross-ppc_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := ppc
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -DSWAP_ENDIANNESS
HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
#
Modified: openbios-devel/config/examples/cross-sparc32_rules.xml
===================================================================
--- openbios-devel/config/examples/cross-sparc32_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/cross-sparc32_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := sparc32
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -DSWAP_ENDIANNESS
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/config/examples/cross-sparc64_rules.xml
===================================================================
--- openbios-devel/config/examples/cross-sparc64_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/cross-sparc64_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := sparc64
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -DSWAP_ENDIANNESS
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/config/examples/sparc32_rules.xml
===================================================================
--- openbios-devel/config/examples/sparc32_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/sparc32_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := sparc32
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -USWAP_ENDIANNESS
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/config/examples/sparc64_rules.xml
===================================================================
--- openbios-devel/config/examples/sparc64_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/sparc64_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := sparc64
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -USWAP_ENDIANNESS
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/config/examples/x86_rules.xml
===================================================================
--- openbios-devel/config/examples/x86_rules.xml 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/config/examples/x86_rules.xml 2006-07-18 21:35:55 UTC (rev 66)
@@ -9,7 +9,6 @@
ARCH := x86
ODIR := obj-$(ARCH)
HOSTCC := gcc
-CROSSCFLAGS := -DNATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH -USWAP_ENDIANNESS
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) -Wno-unused
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
Modified: openbios-devel/kernel/cross.h
===================================================================
--- openbios-devel/kernel/cross.h 2006-06-13 15:34:53 UTC (rev 65)
+++ openbios-devel/kernel/cross.h 2006-07-18 21:35:55 UTC (rev 66)
@@ -14,30 +14,6 @@
* unchanged memory access for performance.
*/
-#if 0
-// This is being moved to rules.xml for now.
-
-#ifdef FCOMPILER
-
-/* FIXME these should be automatically determinded.
- * Manually setting them here is a PITA.
- */
-
-#define NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH
-//#define NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH
-//#define NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH
-
-//#define SWAP_ENDIANNESS
-#undef SWAP_ENDIANNESS
-
-#else /* FCOMPILER */
-
-#define NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH
-#undef SWAP_ENDIANNESS
-
-#endif
-#endif
-
/* byte swapping */
#ifndef SWAP_ENDIANNESS
More information about the OpenBIOS
mailing list