[kaffe] CVS kaffe (dalibor): Added check for packed attribute and changed code to use it

Kaffe CVS cvs-commits at kaffe.org
Wed Jun 23 08:47:08 PDT 2004


PatchSet 4864 
Date: 2004/06/23 15:36:35
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Added check for packed attribute and changed code to use it

2004-06-23  Dalibor Topic  <robilad at kaffe.org>

        * configure.ac:
        Check for 'packed' gcc attribute.

        * configure,
        config/config.h.in,
        kaffe/kaffevm/jni/Makefile.in:
        Regenerated.

        * config/arm/jit.h,
        config/i386/jit.h,
        config/m68k/jit.h:
        Include config.h. Use PACKED instead of using gcc packed
        attribute explicietely.

        * m4/gcc_attribute.m4:
        Added check for 'packed' gcc attribute.

Members: 
	ChangeLog:1.2431->1.2432 
	configure:1.336->1.337 
	configure.ac:1.36->1.37 
	config/config.h.in:1.108->1.109 
	config/arm/jit.h:1.14->1.15 
	config/i386/jit.h:1.23->1.24 
	config/m68k/jit.h:1.15->1.16 
	kaffe/kaffevm/jni/Makefile.in:1.2->1.3 
	m4/gcc_attribute.m4:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2431 kaffe/ChangeLog:1.2432
--- kaffe/ChangeLog:1.2431	Wed Jun 23 09:11:37 2004
+++ kaffe/ChangeLog	Wed Jun 23 15:36:35 2004
@@ -1,3 +1,22 @@
+2004-06-23  Dalibor Topic  <robilad at kaffe.org>
+
+        * configure.ac:
+	Check for 'packed' gcc attribute.
+
+        * configure,
+        config/config.h.in,
+        kaffe/kaffevm/jni/Makefile.in:
+	Regenerated.
+
+        * config/arm/jit.h,
+        config/i386/jit.h,
+        config/m68k/jit.h:
+	Include config.h. Use PACKED instead of using gcc packed
+	attribute explicietely.
+
+        * m4/gcc_attribute.m4:
+	Added check for 'packed' gcc attribute.
+
 2004-06-22  Dalibor Topic  <robilad at kaffe.org>
 
         * configure.ac:
Index: kaffe/configure
diff -u kaffe/configure:1.336 kaffe/configure:1.337
--- kaffe/configure:1.336	Tue Jun 22 15:35:35 2004
+++ kaffe/configure	Wed Jun 23 15:36:36 2004
@@ -6983,99 +6983,6 @@
  ;;
 esac
 
-echo "$as_me:$LINENO: checking CFLAGS for gcc -Wunreachable-code" >&5
-echo $ECHO_N "checking CFLAGS for gcc -Wunreachable-code... $ECHO_C" >&6
-if test "${ac_cv_cflags_gcc_option__Wunreachable_code+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_cflags_gcc_option__Wunreachable_code="no, unknown"
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- ac_save_CFLAGS="$CFLAGS"
-for ac_arg in "-pedantic  % -Wunreachable-code"     #
-do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_cflags_gcc_option__Wunreachable_code=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
- CFLAGS="$ac_save_CFLAGS"
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cflags_gcc_option__Wunreachable_code" >&5
-echo "${ECHO_T}$ac_cv_cflags_gcc_option__Wunreachable_code" >&6
-case ".$ac_cv_cflags_gcc_option__Wunreachable_code" in
-     .ok|.ok,*)  ;;
-   .|.no|.no,*)  ;;
-   *)
-   if echo " $CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wunreachable_code " 2>&1 >/dev/null
-   then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_gcc_option__Wunreachable_code") >&5
-  (: CFLAGS does contain $ac_cv_cflags_gcc_option__Wunreachable_code) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-   else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_gcc_option__Wunreachable_code\"") >&5
-  (: CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wunreachable_code") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-                      CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wunreachable_code"
-   fi
- ;;
-esac
-
 echo "$as_me:$LINENO: checking CFLAGS for gcc -Winline" >&5
 echo $ECHO_N "checking CFLAGS for gcc -Winline... $ECHO_C" >&6
 if test "${ac_cv_cflags_gcc_option__Winline+set}" = set; then
@@ -7596,6 +7503,85 @@
 
 
 
+ echo "$as_me:$LINENO: checking __attribute__((format...))" >&5
+echo $ECHO_N "checking __attribute__((format...))... $ECHO_C" >&6
+ if test "${cv_c_gcc_attribute_format+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cv_c_gcc_attribute_format=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cv_c_gcc_attribute_format=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+ if test "x$cv_c_gcc_attribute_format" = xyes; then
+  true
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GNUC25_PRINTFFORMAT
+_ACEOF
+
+
+ else
+  true
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+ fi
+
+
+
+
+
+
+
+
+
  echo "$as_me:$LINENO: checking __attribute__((noreturn))" >&5
 echo $ECHO_N "checking __attribute__((noreturn))... $ECHO_C" >&6
  if test "${cv_c_gcc_attribute_noreturn+set}" = set; then
@@ -7675,9 +7661,9 @@
 
 
 
- echo "$as_me:$LINENO: checking __attribute__((unused))" >&5
-echo $ECHO_N "checking __attribute__((unused))... $ECHO_C" >&6
- if test "${cv_c_gcc_attribute_unused+set}" = set; then
+ echo "$as_me:$LINENO: checking __attribute__((packed))" >&5
+echo $ECHO_N "checking __attribute__((packed))... $ECHO_C" >&6
+ if test "${cv_c_gcc_attribute_packed+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -7691,7 +7677,7 @@
 int
 main ()
 {
-extern int testfunction(int x) __attribute__((unused))
+extern int testfunction(int x) __attribute__((packed))
   ;
   return 0;
 }
@@ -7718,24 +7704,24 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cv_c_gcc_attribute_unused=yes
+  cv_c_gcc_attribute_packed=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-cv_c_gcc_attribute_unused=no
+cv_c_gcc_attribute_packed=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
 
- if test "x$cv_c_gcc_attribute_unused" = xyes; then
+ if test "x$cv_c_gcc_attribute_packed" = xyes; then
   true
   echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNUC25_UNUSED
+#define HAVE_GNUC25_PACKED
 _ACEOF
 
 
@@ -7754,9 +7740,9 @@
 
 
 
- echo "$as_me:$LINENO: checking __attribute__((format...))" >&5
-echo $ECHO_N "checking __attribute__((format...))... $ECHO_C" >&6
- if test "${cv_c_gcc_attribute_format+set}" = set; then
+ echo "$as_me:$LINENO: checking __attribute__((unused))" >&5
+echo $ECHO_N "checking __attribute__((unused))... $ECHO_C" >&6
+ if test "${cv_c_gcc_attribute_unused+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
@@ -7770,7 +7756,7 @@
 int
 main ()
 {
-extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))
+extern int testfunction(int x) __attribute__((unused))
   ;
   return 0;
 }
@@ -7797,24 +7783,24 @@
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  cv_c_gcc_attribute_format=yes
+  cv_c_gcc_attribute_unused=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-cv_c_gcc_attribute_format=no
+cv_c_gcc_attribute_unused=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
 
- if test "x$cv_c_gcc_attribute_format" = xyes; then
+ if test "x$cv_c_gcc_attribute_unused" = xyes; then
   true
   echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_GNUC25_PRINTFFORMAT
+#define HAVE_GNUC25_UNUSED
 _ACEOF
 
 
@@ -9004,7 +8990,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 9007 "configure"' > conftest.$ac_ext
+  echo '#line 8993 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10354,7 +10340,7 @@
 
 
 # Provide some information about the compiler.
-echo "$as_me:10357:" \
+echo "$as_me:10343:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -11392,11 +11378,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11395: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11381: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11399: \$? = $ac_status" >&5
+   echo "$as_me:11385: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -11625,11 +11611,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11628: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11614: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11632: \$? = $ac_status" >&5
+   echo "$as_me:11618: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -11685,11 +11671,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11688: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11674: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11692: \$? = $ac_status" >&5
+   echo "$as_me:11678: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13869,7 +13855,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13872 "configure"
+#line 13858 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13967,7 +13953,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 13970 "configure"
+#line 13956 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16150,11 +16136,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16153: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16139: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16157: \$? = $ac_status" >&5
+   echo "$as_me:16143: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -16210,11 +16196,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16213: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16199: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16217: \$? = $ac_status" >&5
+   echo "$as_me:16203: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17571,7 +17557,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17574 "configure"
+#line 17560 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17669,7 +17655,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 17672 "configure"
+#line 17658 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18496,11 +18482,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18499: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18485: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18503: \$? = $ac_status" >&5
+   echo "$as_me:18489: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -18556,11 +18542,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18559: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18545: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18563: \$? = $ac_status" >&5
+   echo "$as_me:18549: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -20594,11 +20580,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20597: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20583: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20601: \$? = $ac_status" >&5
+   echo "$as_me:20587: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -20827,11 +20813,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20830: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20816: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20834: \$? = $ac_status" >&5
+   echo "$as_me:20820: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -20887,11 +20873,11 @@
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20890: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20876: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20894: \$? = $ac_status" >&5
+   echo "$as_me:20880: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -23071,7 +23057,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 23074 "configure"
+#line 23060 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -23169,7 +23155,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 23172 "configure"
+#line 23158 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.36 kaffe/configure.ac:1.37
--- kaffe/configure.ac:1.36	Wed Jun 23 09:11:39 2004
+++ kaffe/configure.ac	Wed Jun 23 15:36:42 2004
@@ -139,9 +139,10 @@
 AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
 GCC_ATTRIBUTE_ALWAYS_INLINE
 GCC_ATTRIBUTE_CONST
+GCC_ATTRIBUTE_FORMAT
 GCC_ATTRIBUTE_NORETURN
+GCC_ATTRIBUTE_PACKED
 GCC_ATTRIBUTE_UNUSED
-GCC_ATTRIBUTE_FORMAT
 	 
 if test "$GCC" != "yes"; then
 	AC_MSG_ERROR([Kaffe can only build with GCC])
Index: kaffe/config/config.h.in
diff -u kaffe/config/config.h.in:1.108 kaffe/config/config.h.in:1.109
--- kaffe/config/config.h.in:1.108	Tue Jun 22 15:35:41 2004
+++ kaffe/config/config.h.in	Wed Jun 23 15:36:43 2004
@@ -172,6 +172,10 @@
 /* Define if nonreturning functions a la GCC 2.5 and higher are available. */
 #undef HAVE_GNUC25_NORETURN
 
+/* Define if packing of struct members a la GCC 2.5 and higher is available.
+   */
+#undef HAVE_GNUC25_PACKED
+
 /* Define if printf-format argument lists a la GCC are available. */
 #undef HAVE_GNUC25_PRINTFFORMAT
 
@@ -824,6 +828,22 @@
 #define CONSTANT FUNCATTR((ATTRCONST))
 #endif
 
+/* GNU C printf formats, or null. */
+#ifndef ATTRPRINTF
+#ifdef HAVE_GNUC25_PRINTFFORMAT
+#define ATTRPRINTF(si,tc) format(printf,si,tc)
+#else
+#define ATTRPRINTF(si,tc)
+#endif
+#endif
+#ifndef PRINTFFORMAT
+#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
+#endif
+
+#ifndef NONRETURNPRINTFFORMAT
+#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
+#endif
+
 /* GNU C nonreturning functions, or null. */
 #ifndef ATTRNORETURN
 #ifdef HAVE_GNUC25_NORETURN
@@ -836,6 +856,18 @@
 #define NONRETURNING FUNCATTR((ATTRNORETURN))
 #endif /* NONRETURNING */
 
+/* GNU C constant functions, or null. */
+#ifndef ATTRPACKED
+#ifdef HAVE_GNUC25_PACKED
+#define ATTRPACKED packed
+#else
+#define ATTRPACKED
+#endif
+#endif
+#ifndef PACKED
+#define PACKED FUNCATTR((ATTRPACKED))
+#endif
+
 /* GNU C unused functions, or null. */
 #ifndef ATTRUNUSED
 #ifdef HAVE_GNUC25_UNUSED
@@ -846,20 +878,4 @@
 #endif
 #ifndef UNUSED
 #define UNUSED FUNCATTR((ATTRUNUSED))
-#endif
-
-/* GNU C printf formats, or null. */
-#ifndef ATTRPRINTF
-#ifdef HAVE_GNUC25_PRINTFFORMAT
-#define ATTRPRINTF(si,tc) format(printf,si,tc)
-#else
-#define ATTRPRINTF(si,tc)
-#endif
-#endif
-#ifndef PRINTFFORMAT
-#define PRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc)))
-#endif
-
-#ifndef NONRETURNPRINTFFORMAT
-#define NONRETURNPRINTFFORMAT(si,tc) FUNCATTR((ATTRPRINTF(si,tc),ATTRNORETURN))
 #endif
Index: kaffe/config/arm/jit.h
diff -u kaffe/config/arm/jit.h:1.14 kaffe/config/arm/jit.h:1.15
--- kaffe/config/arm/jit.h:1.14	Tue Mar  9 17:35:47 2004
+++ kaffe/config/arm/jit.h	Wed Jun 23 15:36:44 2004
@@ -15,6 +15,8 @@
 #ifndef __arm_jit_h
 #define __arm_jit_h
 
+#include "config.h"
+
 /* The stack backtrace structure is as follows:
 fp points to here:    |  save code pointer  |      
 		      |  return link value  |      [fp - 4 ]
@@ -100,11 +102,11 @@
 //
 
 typedef struct _methodTrampoline {
-	unsigned int loadlr	__attribute__((packed));
-	unsigned int branch	__attribute__((packed));
-	struct _methods* meth	__attribute__((packed));
-	void** where		__attribute__((packed));
-	void** trampaddr	__attribute__((packed));
+	unsigned int loadlr	PACKED;
+	unsigned int branch	PACKED;
+	struct _methods* meth	PACKED;
+	void** where		PACKED;
+	void** trampaddr	PACKED;
 } methodTrampoline;
 
 extern void arm_do_fixup_trampoline(void);
Index: kaffe/config/i386/jit.h
diff -u kaffe/config/i386/jit.h:1.23 kaffe/config/i386/jit.h:1.24
--- kaffe/config/i386/jit.h:1.23	Fri Apr 16 13:18:57 2004
+++ kaffe/config/i386/jit.h	Wed Jun 23 15:36:44 2004
@@ -12,6 +12,8 @@
 #ifndef __i386_jit_h
 #define __i386_jit_h
 
+#include "config.h"
+
 #if defined(HAVE_VALGRIND_MEMCHECK_H)
 #include <valgrind/memcheck.h>
 #endif
@@ -46,12 +48,6 @@
 /**/
 
 #define HAVE_TRAMPOLINE
-
-#if defined(__GNUC__)
-#define	PACKED	__attribute__((packed))
-#else
-#define	PACKED
-#endif
 
 #if defined(_MSC_VER)
 #pragma pack ( push, 1 )
Index: kaffe/config/m68k/jit.h
diff -u kaffe/config/m68k/jit.h:1.15 kaffe/config/m68k/jit.h:1.16
--- kaffe/config/m68k/jit.h:1.15	Tue Jun 22 16:04:57 2004
+++ kaffe/config/m68k/jit.h	Wed Jun 23 15:36:45 2004
@@ -52,9 +52,9 @@
 
 typedef struct _methodTrampoline {
         unsigned short call;
-	int fixup __attribute__ ((packed));
-	struct _methods* meth __attribute__ ((packed));
-	void** where __attribute__ ((packed));
+	int fixup PACKED;
+	struct _methods* meth PACKED;
+	void** where PACKED;
 } methodTrampoline;
 
 extern void m68k_do_fixup_trampoline(void);
Index: kaffe/kaffe/kaffevm/jni/Makefile.in
diff -u kaffe/kaffe/kaffevm/jni/Makefile.in:1.2 kaffe/kaffe/kaffevm/jni/Makefile.in:1.3
--- kaffe/kaffe/kaffevm/jni/Makefile.in:1.2	Tue Jun 22 17:10:16 2004
+++ kaffe/kaffe/kaffevm/jni/Makefile.in	Wed Jun 23 15:36:45 2004
@@ -361,7 +361,8 @@
 
 noinst_HEADERS = \
 	jni_i.h \
-	jnirefs.h
+	jnirefs.h \
+	jni_funcs.h
 
 all: all-am
 
Index: kaffe/m4/gcc_attribute.m4
diff -u kaffe/m4/gcc_attribute.m4:1.4 kaffe/m4/gcc_attribute.m4:1.5
--- kaffe/m4/gcc_attribute.m4:1.4	Tue Jun 22 15:07:59 2004
+++ kaffe/m4/gcc_attribute.m4	Wed Jun 23 15:36:46 2004
@@ -116,3 +116,18 @@
 #define ALWAYS_INLINE FUNCATTR((ATTRALWAYS_INLINE))
 #endif])
 ])
+AC_DEFUN([GCC_ATTRIBUTE_PACKED],[
+ AC_REQUIRE([GCC_ATTRIBUTE_SUPPORTED])
+ GCC_ATTRIBUTE(packed,packed,[int x],packed,PACKED,[Define if packing of struct members a la GCC 2.5 and higher is available.])
+ AH_BOTTOM([/* GNU C constant functions, or null. */
+#ifndef ATTRPACKED
+#ifdef HAVE_GNUC25_PACKED
+#define ATTRPACKED packed
+#else
+#define ATTRPACKED
+#endif
+#endif
+#ifndef PACKED
+#define PACKED FUNCATTR((ATTRPACKED))
+#endif])
+])




More information about the kaffe mailing list