[kaffe] config.frag files for NetBSD

Kiyo Inaba inaba at src.ricoh.co.jp
Mon Jul 28 03:16:02 PDT 2003


Hi,

Thanks for the official support of crosstools in the latest NetBSD,
I tried to compile all Kaffe configurations available for NetBSD
(alpha, arm, m68k, mips, powerpc, sparc).

Attached patch deleted unneeded defs in config.frag files for these
configurations. I think similar mods can be applied to all other
platforms.

The mods can be devided into four types
1. Delete 'Khost_cpu' and 'Khost_os' defined in some files.
2. 'ac_cv_sizeof_int' etc. are now properly handled by 'configure'
   even for cross compiling.
3. 'ac_cv_c_char_unsigned' is now set to 'no', when cross compiling.
4. 'CFLAGS' is now used only to append mandatory settings for the port.

Typical way of cross compiling is done by
    ../kaffe-1.1.0/configure --host=m68k--netbsdelf --enable-debug \\
    --with-staticbin --with-staticlib --with-staticvm \\
    --with-threads=unix-jthreads --without-x --without-sound \\
    --with-engine=intrp \\
    --with-rt-jar=$PWD/../kaffe-1.1.0/libraries/javalib/rt-precompiled.jar

At least for alpha, arm, m68k, powerpc, sparc, this new config.frag
works fine to make 'kaffe-bin', and with slight modification, mips is
also ok but it's another topic.

Is this mod applicable?

Kiyo
-------------------------------------------------------------------------
diff -Naur kaffe-1.1.0.orig/config/alpha/netbsd1/config.frag kaffe-1.1.0/config/alpha/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/alpha/netbsd1/config.frag	Wed May 21 17:40:41 2003
+++ kaffe-1.1.0/config/alpha/netbsd1/config.frag	Mon Jul 28 18:12:40 2003
@@ -1,6 +1,8 @@
 #
 # Alpha/Netbsd1 configuration
 #
-Khost_cpu=alpha
-Khost_os=netbsd1
 CFLAGS="$CFLAGS -mieee"
+
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi
diff -Naur kaffe-1.1.0.orig/config/arm/netbsd1/config.frag kaffe-1.1.0/config/arm/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/arm/netbsd1/config.frag	Sun Oct 17 05:52:40 1999
+++ kaffe-1.1.0/config/arm/netbsd1/config.frag	Mon Jul 28 18:12:43 2003
@@ -2,3 +2,7 @@
 # Arm/Netbsd1 configuration 
 #     
 vm_dynamic_library=no
+
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi
diff -Naur kaffe-1.1.0.orig/config/i386/netbsd1/config.frag kaffe-1.1.0/config/i386/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/i386/netbsd1/config.frag	Sat Dec 18 14:09:32 1999
+++ kaffe-1.1.0/config/i386/netbsd1/config.frag	Mon Jul 28 18:11:53 2003
@@ -1,5 +1,6 @@
 #
 # i386/Netbsd1 configuration
 #
-Khost_cpu=i386
-Khost_os=netbsd1
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi
diff -Naur kaffe-1.1.0.orig/config/m68k/netbsd1/config.frag kaffe-1.1.0/config/m68k/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/m68k/netbsd1/config.frag	Sat Dec 18 14:09:35 1999
+++ kaffe-1.1.0/config/m68k/netbsd1/config.frag	Mon Jul 28 18:12:49 2003
@@ -1,18 +1,8 @@
 #
 # m68k/Netbsd1 configuration.
 #
-Khost_cpu=m68k
-Khost_os=netbsd1
-CFLAGS="-g -Wall -Wstrict-prototypes"
+CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+
 if [ "$cross_compiling" = yes ]; then
-# if we use cross environment, following values may not be detected.
-  ac_cv_alignmentof_voidp=${ac_cv_alignmentof_voidp='2'}
-  ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}
-  ac_cv_sizeof___int64=${ac_cv_sizeof___int64='0'}
-  ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
-  ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
-  ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'}
-  ac_cv_sizeof_short=${ac_cv_sizeof_short='2'}
-  ac_cv_sizeof_voidp=${ac_cv_sizeof_voidp='4'}
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
 fi
-
diff -Naur kaffe-1.1.0.orig/config/mips/netbsd1/config.frag kaffe-1.1.0/config/mips/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/mips/netbsd1/config.frag	Sat Dec 18 14:09:36 1999
+++ kaffe-1.1.0/config/mips/netbsd1/config.frag	Mon Jul 28 18:12:52 2003
@@ -1,5 +1,8 @@
 #
 # Mips/Netbsd configuration.
 #
-Khost_cpu=mips
-Khost_os=netbsd1
+CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi
diff -Naur kaffe-1.1.0.orig/config/powerpc/netbsd1/config.frag kaffe-1.1.0/config/powerpc/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/powerpc/netbsd1/config.frag	Tue Aug 28 23:58:46 2001
+++ kaffe-1.1.0/config/powerpc/netbsd1/config.frag	Mon Jul 28 18:12:32 2003
@@ -1,8 +1,11 @@
 #
 # PowerPC/NetBSD configuration
 #
-Khost_cpu=powerpc
-Khost_os=netbsd1
+CFLAGS="$CFLAGS -fsigned-char"
+
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi
 
 if test "$with_setjmp" = "glibc"; then
     # Use setjmp()/longjmp() from glibc-2.2.2
@@ -11,5 +14,3 @@
     # Use sigsetjmp()/siglongjmp()
     CPPFLAGS="$CPPFLAGS -DJTHREAD_USE_SIGSETJMP"
 fi
-
-CFLAGS="$CFLAGS -fsigned-char"
diff -Naur kaffe-1.1.0.orig/config/sparc/netbsd1/config.frag kaffe-1.1.0/config/sparc/netbsd1/config.frag
--- kaffe-1.1.0.orig/config/sparc/netbsd1/config.frag	Sat Dec 18 14:09:38 1999
+++ kaffe-1.1.0/config/sparc/netbsd1/config.frag	Mon Jul 28 18:12:35 2003
@@ -1,5 +1,6 @@
 #
 # Sparc/NetBSD1 configuration
 #
-Khost_cpu=sparc
-Khost_os=netbsd1
+if [ "$cross_compiling" = yes ]; then
+  ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+fi




More information about the kaffe mailing list