[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] make target boot-chicken ignore ARCH and compiler flag
From: |
Sven Hartrumpf |
Subject: |
[Chicken-hackers] make target boot-chicken ignore ARCH and compiler flags |
Date: |
Mon, 18 Jul 2011 08:55:38 +0200 (CEST) |
Hi all.
I am trying to bootstrap chicken (git version) on a 64bit machine
as a 32bit build. The boot-chicken target ignores ARCH and the compiler
flags so that the .o files are 64bit and the final linking step
(forcing 32bit) fails:
make ARCH=x86 C_COMPILER=gcc446 'C_COMPILER_OPTIMIZATION_OPTIONS=-Os
-ffast-math -fomit-frame-pointer -march=core2 -m32 -Wa,-32' LINKER=gcc446
'LINKER_OPTIONS=-m32 -Wa,-32' PLATFORM=linux PREFIX=/usr/local NOPTABLES=1
boot-chicken
make -f ./Makefile.linux boot-chicken
make[1]: Entering directory `/home/sh/soft/chicken32'
make -f Makefile.linux PLATFORM=linux PREFIX=/nowhere CONFIG= \
SRCDIR=./ CHICKEN=chicken PROGRAM_SUFFIX=-boot-stage1 STATICBUILD=1 \
C_COMPILER_OPTIMIZATION_OPTIONS= C_HACKED_APPLY= \
confclean chicken-boot-stage1
make[2]: Entering directory `/home/sh/soft/chicken32'
rm -f \
chicken-config.h chicken-defaults.h chicken-install.rc chicken-uninstall.rc
echo "#define C_CHICKEN_PROGRAM \"chicken-boot-stage1\"" >>chicken-defaults.h
echo "#ifndef C_INSTALL_CC" >>chicken-defaults.h
echo "# define C_INSTALL_CC \"gcc446\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_CXX" >>chicken-defaults.h
echo "# define C_INSTALL_CXX \"g++\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_RC_COMPILER" >>chicken-defaults.h
echo "# define C_INSTALL_RC_COMPILER \"\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_CFLAGS" >>chicken-defaults.h
echo "# define C_INSTALL_CFLAGS \"-fno-strict-aliasing -fwrapv
-DHAVE_CHICKEN_CONFIG_H \"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_LDFLAGS" >>chicken-defaults.h
echo "# define C_INSTALL_LDFLAGS \"-m32 -Wa,-32 \"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_PREFIX" >>chicken-defaults.h
echo "# define C_INSTALL_PREFIX \"/nowhere\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_SHARE_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_SHARE_HOME \"/nowhere/share/chicken-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_BIN_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_BIN_HOME \"/nowhere/bin\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_EGG_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_EGG_HOME \"/nowhere/lib/chicken-boot-stage1/6\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_LIB_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_LIB_HOME \"/nowhere/lib\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_LIB_NAME" >>chicken-defaults.h
echo "# define C_INSTALL_LIB_NAME \"chicken-boot-stage1\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_STATIC_LIB_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_STATIC_LIB_HOME \"/nowhere/lib\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_INCLUDE_HOME" >>chicken-defaults.h
echo "# define C_INSTALL_INCLUDE_HOME \"/nowhere/include/chicken-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_MORE_LIBS" >>chicken-defaults.h
echo "# define C_INSTALL_MORE_LIBS \"-lm -ldl\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_INSTALL_MORE_STATIC_LIBS" >>chicken-defaults.h
echo "# define C_INSTALL_MORE_STATIC_LIBS \"-lm -ldl\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_DEFAULT_TARGET_STACK_SIZE" >>chicken-defaults.h
echo "# define C_DEFAULT_TARGET_STACK_SIZE (128*1024)" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_DEFAULT_TARGET_HEAP_SIZE" >>chicken-defaults.h
echo "# define C_DEFAULT_TARGET_HEAP_SIZE 0" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_STACK_GROWS_DOWNWARD" >>chicken-defaults.h
echo "# define C_STACK_GROWS_DOWNWARD 1" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_TARGET_MORE_LIBS" >>chicken-defaults.h
echo "# define C_TARGET_MORE_LIBS \"-lm -ldl\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_TARGET_MORE_STATIC_LIBS" >>chicken-defaults.h
echo "# define C_TARGET_MORE_STATIC_LIBS \"-lm -ldl\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_TARGET_CC" >>chicken-defaults.h
echo "# define C_TARGET_CC \"gcc446\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_TARGET_CXX" >>chicken-defaults.h
echo "# define C_TARGET_CXX \"g++\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_TARGET_RC_COMPILER" >>chicken-defaults.h
...
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_CSI_PROGRAM" >>chicken-defaults.h
echo "# define C_CSI_PROGRAM \"csi-boot-stage1\"" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_CHICKEN_BUG_PROGRAM" >>chicken-defaults.h
echo "# define C_CHICKEN_BUG_PROGRAM \"chicken-bug-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_CHICKEN_INSTALL_PROGRAM" >>chicken-defaults.h
echo "# define C_CHICKEN_INSTALL_PROGRAM \"chicken-install-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_CHICKEN_UNINSTALL_PROGRAM" >>chicken-defaults.h
echo "# define C_CHICKEN_UNINSTALL_PROGRAM \"chicken-uninstall-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_CHICKEN_STATUS_PROGRAM" >>chicken-defaults.h
echo "# define C_CHICKEN_STATUS_PROGRAM \"chicken-status-boot-stage1\""
>>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_WINDOWS_SHELL" >>chicken-defaults.h
echo "# define C_WINDOWS_SHELL 0" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "#ifndef C_BINARY_VERSION" >>chicken-defaults.h
echo "# define C_BINARY_VERSION 6" >>chicken-defaults.h
echo "#endif" >>chicken-defaults.h
echo "/* END OF FILE */" >>chicken-defaults.h
echo "/* GENERATED */" >chicken-config.h
echo "#define HAVE_DIRENT_H 1" >>chicken-config.h
echo "#define HAVE_DLFCN_H 1" >>chicken-config.h
echo "#define HAVE_INTTYPES_H 1" >>chicken-config.h
echo "#define HAVE_LIMITS_H 1" >>chicken-config.h
echo "#define HAVE_LONG_LONG 1" >>chicken-config.h
echo "#define HAVE_MEMMOVE 1" >>chicken-config.h
echo "#define HAVE_MEMORY_H 1" >>chicken-config.h
echo "#define HAVE_STDINT_H 1" >>chicken-config.h
echo "#define HAVE_STDLIB_H 1" >>chicken-config.h
echo "#define HAVE_STRERROR 1" >>chicken-config.h
echo "#define HAVE_STRINGS_H 1" >>chicken-config.h
echo "#define HAVE_STRING_H 1" >>chicken-config.h
echo "#define HAVE_STRTOLL 1" >>chicken-config.h
echo "#define HAVE_STRTOQ 1" >>chicken-config.h
echo "#define HAVE_SYS_STAT_H 1" >>chicken-config.h
echo "#define HAVE_SYS_TYPES_H 1" >>chicken-config.h
echo "#define HAVE_UNISTD_H 1" >>chicken-config.h
echo "#define HAVE_UNSIGNED_LONG_LONG 1" >>chicken-config.h
echo "#define STDC_HEADERS 1" >>chicken-config.h
echo "#define HAVE_ALLOCA 1" >>chicken-config.h
echo "#define HAVE_ALLOCA_H 1" >>chicken-config.h
echo "#define HAVE_GRP_H 1" >>chicken-config.h
echo "#define HAVE_ERRNO_H 1" >>chicken-config.h
echo "#define HAVE_GCVT 1" >>chicken-config.h
echo "#define HAVE_SYSEXITS_H 1" >>chicken-config.h
echo "#define HAVE_MEMMOVE 1" >>chicken-config.h
echo "#define C_STACK_GROWS_DOWNWARD 1" >>chicken-config.h
echo "#define C_HACKED_APPLY" >>chicken-config.h
cat chicken-defaults.h >>chicken-config.h
gcc446 -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -c chicken.c -o
chicken-static.o -I. -I./
...
gcc446 -m32 -Wa,-32 -L. chicken-static.o batch-driver-static.o
compiler-static.o optimizer-static.o compiler-syntax-static.o
scrutinizer-static.o unboxing-static.o support-static.o c-platform-static.o
c-backend-static.o -o chicken-boot-stage1 libchicken-boot-stage1.a -lm -ldl
/usr/bin/ld: i386:x86-64 architecture of input file `chicken-static.o' is
incompatible with i386 output
Any easy solutions?
Sven
- [Chicken-hackers] make target boot-chicken ignore ARCH and compiler flags,
Sven Hartrumpf <=