diff -Nur modutils-2.4.24/ChangeLog modutils-2.4.25/ChangeLog --- modutils-2.4.24/ChangeLog Sun Mar 23 13:43:54 2003 +++ modutils-2.4.25/ChangeLog Sat Mar 29 10:54:20 2003 @@ -1,3 +1,11 @@ +2003-03-29 Keith Owens + + modutils 2.4.25 + + * Add hppa and hppa64 to the list of architectures that have function + descriptors. + * Add combined s390/s390x support. IBM. + 2003-03-23 Keith Owens modutils 2.4.24 diff -Nur modutils-2.4.24/configure modutils-2.4.25/configure --- modutils-2.4.24/configure Wed Jan 29 17:39:00 2003 +++ modutils-2.4.25/configure Sat Mar 29 11:08:42 2003 @@ -49,10 +49,14 @@ modules (default on hppa is yes, default on other architectures is no)" ac_help="$ac_help - --enable-common-ppc Make one executable handle 32 and 64 bit kernel + --enable-common-ppc Make one executable handle 32 and 64 bit kernel modules (default on ppc is yes, default on other architectures is no)" ac_help="$ac_help + --enable-common-s390 Make one executable handle 32 and 64 bit kernel + modules (default on s390 is yes, default on other + architectures is no)" +ac_help="$ac_help --enable-strip Strip binaries during install. Default is no on IA64 (ski does not like stripped binaries), yes on other architectures" @@ -638,7 +642,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:642: checking host system type" >&5 +echo "configure:646: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -659,7 +663,7 @@ echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:663: checking target system type" >&5 +echo "configure:667: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -677,7 +681,7 @@ echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:681: checking build system type" >&5 +echo "configure:685: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -881,6 +885,24 @@ esac +COMMON_s390=yes +# Check whether --enable-common-s390 or --disable-common-s390 was given. +if test "${enable_common_s390+set}" = set; then + enableval="$enable_common_s390" + if test "$enableval" = "yes"; then + COMMON_s390=yes + else + COMMON_s390=no +fi +fi + +case "$ARCH" in + s390x) if test "$COMMON_s390" = "yes"; then ARCH="s390"; fi ;; + s390*) ;; + *) COMMON_s390=no ;; +esac + + case "$ARCH" in @@ -922,7 +944,7 @@ # Default for use-syscall depends on the presence of query_module in libc. echo $ac_n "checking for query_module in -lc""... $ac_c" 1>&6 -echo "configure:926: checking for query_module in -lc" >&5 +echo "configure:948: checking for query_module in -lc" >&5 ac_lib_var=`echo c'_'query_module | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -930,7 +952,7 @@ ac_save_LIBS="$LIBS" LIBS="-lc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1012,7 +1034,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1016: checking for $ac_word" >&5 +echo "configure:1038: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1042,7 +1064,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1046: checking for $ac_word" >&5 +echo "configure:1068: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1093,7 +1115,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1097: checking for $ac_word" >&5 +echo "configure:1119: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1125,7 +1147,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1129: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1136,12 +1158,12 @@ cat > conftest.$ac_ext << EOF -#line 1140 "configure" +#line 1162 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1167,12 +1189,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1171: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1176: checking whether we are using GNU C" >&5 +echo "configure:1198: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1181,7 +1203,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1200,7 +1222,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1204: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1226: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1239,7 +1261,7 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1243: checking for $ac_word" >&5 +echo "configure:1265: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1267,7 +1289,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1271: checking whether ln -s works" >&5 +echo "configure:1293: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1346,12 +1368,12 @@ echo $ac_n "checking for wordexp""... $ac_c" 1>&6 -echo "configure:1350: checking for wordexp" >&5 +echo "configure:1372: checking for wordexp" >&5 if eval "test \"`echo '$''{'ac_cv_func_wordexp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_wordexp=yes" else @@ -1397,12 +1419,12 @@ echo $ac_n "checking for glob""... $ac_c" 1>&6 -echo "configure:1401: checking for glob" >&5 +echo "configure:1423: checking for glob" >&5 if eval "test \"`echo '$''{'ac_cv_func_glob'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_glob=yes" else @@ -1449,13 +1471,13 @@ if test "$ARCH" = "alpha"; then echo $ac_n "checking for broken alpha assembler""... $ac_c" 1>&6 -echo "configure:1453: checking for broken alpha assembler" >&5 +echo "configure:1475: checking for broken alpha assembler" >&5 cat > conftest.c <&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ac_broken_gas=no if objdump -r conftest.o | grep 'LITERAL.*y.*4$' > /dev/null; then cat >> confdefs.h <<\EOF @@ -1650,6 +1672,7 @@ s%@COMMON_sparc@%$COMMON_sparc%g s%@COMMON_hppa@%$COMMON_hppa%g s%@COMMON_ppc@%$COMMON_ppc%g +s%@COMMON_s390@%$COMMON_s390%g s%@ARCH@%$ARCH%g s%@STRIP@%$STRIP%g s%@USE_SYSCALL@%$USE_SYSCALL%g diff -Nur modutils-2.4.24/configure.in modutils-2.4.25/configure.in --- modutils-2.4.24/configure.in Wed Jan 29 17:39:00 2003 +++ modutils-2.4.25/configure.in Sat Mar 29 11:08:42 2003 @@ -158,7 +158,7 @@ COMMON_ppc=yes AC_ARG_ENABLE(common-ppc, -[ --enable-common-ppc Make one executable handle 32 and 64 bit kernel +[ --enable-common-ppc Make one executable handle 32 and 64 bit kernel modules (default on ppc is yes, default on other architectures is no)], [if test "$enableval" = "yes"; then @@ -172,6 +172,23 @@ *) COMMON_ppc=no ;; esac AC_SUBST(COMMON_ppc) + +COMMON_s390=yes +AC_ARG_ENABLE(common-s390, +[ --enable-common-s390 Make one executable handle 32 and 64 bit kernel + modules (default on s390 is yes, default on other + architectures is no)], +[if test "$enableval" = "yes"; then + COMMON_s390=yes + else + COMMON_s390=no +fi]) +case "$ARCH" in + s390x) if test "$COMMON_s390" = "yes"; then ARCH="s390"; fi ;; + s390*) ;; + *) COMMON_s390=no ;; +esac +AC_SUBST(COMMON_s390) AC_SUBST(ARCH) diff -Nur modutils-2.4.24/depmod/Makefile.in modutils-2.4.25/depmod/Makefile.in --- modutils-2.4.24/depmod/Makefile.in Mon Nov 25 14:23:35 2002 +++ modutils-2.4.25/depmod/Makefile.in Sat Mar 29 10:54:20 2003 @@ -20,6 +20,10 @@ DEFS64 := -DELF_MACHINE_H='"elf_ppc64.h"' -DARCH_ppc64 endif +ifeq (@COMMON_s390@,yes) +DEFS64 := -DELF_MACHINE_H='"elf_s390x.h"' -DARCH_s390x +endif + # arch independent definitions for common 32/64 code ifdef DEFS64 diff -Nur modutils-2.4.24/include/util.h modutils-2.4.25/include/util.h --- modutils-2.4.24/include/util.h Sun Mar 23 13:34:28 2003 +++ modutils-2.4.25/include/util.h Sat Mar 29 10:45:50 2003 @@ -96,7 +96,7 @@ #define SYMPREFIX "__insmod_"; extern const char symprefix[10]; /* Must be sizeof(SYMPREFIX), including nul */ -#if defined(ARCH_ia64) || defined(ARCH_ppc64) +#if defined(ARCH_ia64) || defined(ARCH_ppc64) || defined(ARCH_hppa) || defined(ARCH_hppa64) #define HAS_FUNCTION_DESCRIPTORS #endif diff -Nur modutils-2.4.24/include/version.h modutils-2.4.25/include/version.h --- modutils-2.4.24/include/version.h Sun Mar 23 12:27:40 2003 +++ modutils-2.4.25/include/version.h Sat Mar 29 10:43:56 2003 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.24" +#define MODUTILS_VERSION "2.4.25" diff -Nur modutils-2.4.24/insmod/Makefile.in modutils-2.4.25/insmod/Makefile.in --- modutils-2.4.24/insmod/Makefile.in Sun Mar 23 13:43:54 2003 +++ modutils-2.4.25/insmod/Makefile.in Sat Mar 29 10:54:20 2003 @@ -42,6 +42,10 @@ DEFS64 := -DELF_MACHINE_H='"elf_ppc64.h"' -DARCH_ppc64 endif +ifeq (@COMMON_s390@,yes) +DEFS64 := -DELF_MACHINE_H='"elf_s390x.h"' -DARCH_s390x +endif + # arch independent definitions for common 32/64 code ifdef DEFS64 diff -Nur modutils-2.4.24/modutils.spec modutils-2.4.25/modutils.spec --- modutils-2.4.24/modutils.spec Sun Mar 23 12:27:40 2003 +++ modutils-2.4.25/modutils.spec Sat Mar 29 10:43:56 2003 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.24 +Version: 2.4.25 Release: 1 Copyright: GPL Group: Utilities/System diff -Nur modutils-2.4.24/obj/Makefile.in modutils-2.4.25/obj/Makefile.in --- modutils-2.4.24/obj/Makefile.in Fri Mar 1 11:39:06 2002 +++ modutils-2.4.25/obj/Makefile.in Sat Mar 29 10:54:20 2003 @@ -28,6 +28,12 @@ DEFS64 := -DELF_MACHINE_H='"elf_ppc64.h"' -DARCH_ppc64 endif +ifeq (@COMMON_s390@,yes) +LIBOBJ_OBJS += obj_s390x_64.o +LIBOBJ_SRCS += obj_s390x.c +DEFS64 := -DELF_MACHINE_H='"elf_s390x.h"' -DARCH_s390x +endif + # arch independent definitions for common 32/64 code diff -Nur modutils-2.4.24/obj/obj_s390.c modutils-2.4.25/obj/obj_s390.c --- modutils-2.4.24/obj/obj_s390.c Tue Jan 28 03:18:47 2003 +++ modutils-2.4.25/obj/obj_s390.c Sat Mar 29 10:54:20 2003 @@ -277,7 +277,7 @@ if (!ge->allocated) { ge->allocated = 1; ge->offset = got_offset; - got_offset += sizeof(void*); + got_offset += sizeof(tgt_long); } break; diff -Nur modutils-2.4.24/obj/obj_s390x.c modutils-2.4.25/obj/obj_s390x.c --- modutils-2.4.24/obj/obj_s390x.c Tue Jan 28 03:18:47 2003 +++ modutils-2.4.25/obj/obj_s390x.c Sat Mar 29 10:54:20 2003 @@ -309,7 +309,7 @@ if (!ge->allocated) { ge->allocated = 1; ge->offset = got_offset; - got_offset += sizeof(void*); + got_offset += sizeof(tgt_long); } break; diff -Nur modutils-2.4.24/util/arch64.c modutils-2.4.25/util/arch64.c --- modutils-2.4.24/util/arch64.c Sun Apr 28 19:39:21 2002 +++ modutils-2.4.25/util/arch64.c Sat Mar 29 10:54:20 2003 @@ -39,5 +39,5 @@ memcpy(uts.machine, uname_m, l); uts.machine[l] = '\0'; } - return(strstr(uts.machine, "64") != NULL); + return(strstr(uts.machine, "64") != NULL || strstr(uts.machine, "s390x") != NULL); }