[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems cross compiling
From: |
brian |
Subject: |
problems cross compiling |
Date: |
Wed, 30 May 2001 23:08:51 +0200 |
Configuration Information [Automatically generated, do not change]:
Machine: mipsel
OS: linux-gnu
Compiler: /usr/local/sp-compilers/v2/bin/mipsel-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='mipsel'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='mipsel-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I.
-I. -I./include -I./lib -mips2 -O2
uname output: Linux brian 2.4.4 #13 SMP Mon May 14 19:06:08 CEST 2001 i686
unknown
Machine Type: mipsel-unknown-linux-gnu
Bash Version: 2.05
Patch Level: 0
Release Status: release
Description:
bash fails to cross compile because the native include directory
is included in the include search path and because the CCFLAGS
variable is used for native and cross compilation.
Repeat-By:
Cross compile bash. Especially if you give some CFLAGS which
do not exist on the native platform: cross compiling
for mips on intel for example if you give -mips2 as CFLAGS
when configuring causes the build to fail.
Fix:
diff -ru bash-2.05/Makefile.in bash-2.05.new/Makefile.in
--- bash-2.05/Makefile.in Tue Apr 3 21:03:24 2001
+++ bash-2.05.new/Makefile.in Wed May 30 22:46:29 2001
@@ -110,10 +110,12 @@
SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"'
-DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"'
-DCONF_VENDOR='"$(VENDOR)"'
-CCFLAGS = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \
- $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
+CCFLAGS_FOR_BUILD = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \
+ $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES)
-INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC)
-I$(includedir)
+CCFLAGS = $(CCFLAGS_FOR_BUILD) $(CFLAGS)
+
+INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC)
GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-Wwrite-strings -Werror -Wstrict-prototypes \
@@ -129,7 +131,7 @@
LIBSUBDIR = lib
LIBSRC = $(srcdir)/$(LIBSUBDIR)
-SUBDIR_INCLUDES = -I. @RL_INCLUDE@ -I$(topdir) -I$(topdir)/$(LIBSUBDIR)
-I$(includedir)
+SUBDIR_INCLUDES = -I. @RL_INCLUDE@ -I$(topdir) -I$(topdir)/$(LIBSUBDIR)
# the bash library
# the library is a mix of functions that the C library does not provide on
@@ -511,10 +513,10 @@
$(MAKE) $(MFLAGS) ${SHLIB_LIBNAME}) || exit 1
mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c
- $(CC_FOR_BUILD) $(CCFLAGS) $(CPPFLAGS) -o $@ $(SUPPORT_SRC)mksignames.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)mksignames.c
mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h
- ${CC_FOR_BUILD} ${CCFLAGS} ${CPPFLAGS} -o $@ ${srcdir}/mksyntax.c
+ ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c
# make a list of signals for the local system -- this is done when we're
# *not* cross-compiling
diff -ru bash-2.05/builtins/Makefile.in bash-2.05.new/builtins/Makefile.in
--- bash-2.05/builtins/Makefile.in Sat Oct 14 23:35:28 2000
+++ bash-2.05.new/builtins/Makefile.in Wed May 30 22:46:29 2001
@@ -48,8 +48,10 @@
INCLUDES = -I. -I.. @RL_INCLUDE@ -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib
-I$(srcdir)
-CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) $(CPPFLAGS) \
- ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
+CCFLAGS_FOR_BUILD = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \
+ $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES)
+
+CCFLAGS = $(CCFLAGS_FOR_BUILD) $(CFLAGS)
MKBUILTINS = mkbuiltins$(EXEEXT)
DIRECTDEFINE = -D $(srcdir)
@@ -131,10 +133,10 @@
mkbuiltins.o: ../config.h
mkbuiltins.o: mkbuiltins.c
$(RM) $@
- $(CC_FOR_BUILD) -c $(CCFLAGS) $<
+ $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
mkbuiltins$(EXEEXT): mkbuiltins.o
- $(CC_FOR_BUILD) $(PROFILE_FLAGS) $(LDFLAGS) -o $(MKBUILTINS)
mkbuiltins.o $(LIBS)
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $(MKBUILTINS) mkbuiltins.o
$(LIBS)
# rules for deficient makes, like SunOS
mkbuiltins.o: mkbuiltins.c
@@ -151,7 +153,7 @@
$(SHELL) $(srcdir)/psize.sh > $@
psize.aux: psize.c
- $(CC_FOR_BUILD) $(CCFLAGS) -o $@ $(srcdir)/psize.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(srcdir)/psize.c
documentation: builtins.texi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- problems cross compiling,
brian <=