Hi,
this patch adds support for AIX ppc incl. IA64 to rpm 4.0.2
diff -C 2 -r rpm-4.0.2/aclocal.m4 rpm-4.0.2/aclocal.m4
*** aclocal.m4 Wed Sep 25 11:58:55 2002
--- aclocal.m4 Wed Sep 25 16:04:33 2002
***************
*** 878,882 ****
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h sys/param.h])
! AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
strdup __argz_count __argz_stringify __argz_next])
--- 878,883 ----
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h sys/param.h])
! AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
strdup __argz_count __argz_stringify __argz_next])
diff -C 2 -r rpm-4.0.2/config.guess rpm-4.0.2/config.guess
*** config.guess Wed Sep 25 11:56:03 2002
--- config.guess Wed Sep 25 14:56:57 2002
***************
*** 545,548 ****
--- 545,554 ----
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
+ ia64:AIX:*:5)
+ echo ia64-intel-aix5.${UNAME_RELEASE}
+ exit 0 ;;
+ *:AIX:*:5)
+ echo powerpc-ibm-aix5.${UNAME_RELEASE}
+ exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
diff -C 2 -r rpm-4.0.2/config.sub rpm-4.0.2/config.sub
*** config.sub Wed Sep 25 11:56:03 2002
--- config.sub Wed Sep 25 14:58:47 2002
***************
*** 559,562 ****
--- 559,565 ----
os=-proelf
;;
+ ia64*)
+ basic_machine=ia64-intel
+ ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
diff -C 2 -r rpm-4.0.2/configure.in rpm-4.0.2/configure.in
*** configure.in Wed Sep 25 13:58:24 2002
--- configure.in Wed Sep 25 16:03:20 2002
***************
*** 46,49 ****
--- 46,50 ----
*-*-hpux*) LDFLAGS_STATIC="-static";;
*-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared
libthread.
+ *-*-aix*) LDFLAGS_STATIC="";;
*-*-*) LDFLAGS_STATIC="-all-static";;
esac
***************
*** 69,73 ****
--- 70,78 ----
;;
esac
+ if test X"$LDFLAGS_STATIC" != X ; then
+ LDFLAGS_STATIC="${LDFLAGS_STATIC}-static"
+ fi
else
+
# just link it dynamically
LDFLAGS_STATIC=""
***************
*** 685,689 ****
dnl XXX AC_CHECK_FUNCS(gethostname mkdir mkfifo rmdir select uname)
! AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath setenv)
AC_CHECK_FUNCS(stpcpy stpncpy strcspn)
AC_CHECK_FUNCS(strdup strerror strtol strtoul strspn strstr)
--- 690,696 ----
dnl XXX AC_CHECK_FUNCS(gethostname mkdir mkfifo rmdir select uname)
! dnl AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath setenv)
! AC_CHECK_FUNCS(basename getcwd getwd inet_aton mtrace putenv realpath)
!
AC_CHECK_FUNCS(stpcpy stpncpy strcspn)
AC_CHECK_FUNCS(strdup strerror strtol strtoul strspn strstr)
Only in /tmp/openpkg-1.1.0/rpm-4.0.2: doc
Only in /tmp/openpkg-1.1.0/rpm-4.0.2: intl
diff -C 2 -r rpm-4.0.2/ltconfig rpm-4.0.2/ltconfig
*** ltconfig Fri Feb 23 22:43:42 2001
--- ltconfig Wed Sep 25 15:41:11 2002
***************
*** 697,703 ****
# PORTME Check for PIC flags for the system compiler.
case "$host_os" in
! aix3* | aix4*)
# All AIX code is PIC.
! link_static_flag='-bnso -bI:/lib/syscalls.exp'
;;
--- 697,711 ----
# PORTME Check for PIC flags for the system compiler.
case "$host_os" in
! aix3* | aix4* | aix5*)
!
# All AIX code is PIC.
! case "$host_cpu" in
! ia64) # AIX 5 now supports IA64 processor
! link_static_flag='-Bstatic'
! ;;
! *) #
! link_static_flag='-bnso -bI:/lib/syscalls.exp'
! ;;
! esac
;;
***************
*** 1116,1120 ****
# See if GNU ld supports shared libraries.
case "$host_os" in
! aix3* | aix4*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
--- 1124,1128 ----
# See if GNU ld supports shared libraries.
case "$host_os" in
! aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
***************
*** 1277,1282 ****
;;
! aix4*)
! hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b
${wl}libpath:$libdir:/usr/lib:/lib'
hardcode_libdir_separator=':'
if test "$with_gcc" = yes; then
--- 1285,1292 ----
;;
! aix4* | aix5*)
!
!
!
hardcode_libdir_separator=':'
if test "$with_gcc" = yes; then
***************
*** 1299,1305 ****
shared_flag='-shared'
else
! shared_flag='${wl}-bM:SRE'
hardcode_direct=yes
fi
allow_undefined_flag=' ${wl}-berok'
archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts
${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
--- 1309,1320 ----
shared_flag='-shared'
else
! if test "$host_cpu" = ia64; then
! shared_flag='${wl}-G'
! else
! shared_flag='${wl}-bM:SRE'
! fi
hardcode_direct=yes
fi
+
allow_undefined_flag=' ${wl}-berok'
archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts
${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
***************
*** 1310,1314 ****
--- 1325,1370 ----
esac
;;
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # Test if we are trying to use run time linking, or normal AIX style linking.
+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
+ aix_use_runtimelinking=no
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ exp_sym_flag='-bexport'
+ no_entry_flag='${wl}-bnoentry'
+ fi
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ allow_undefined_flag=' -Wl,-G'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag=" ${wl}-z nodefs"
+ else
+ hardcode_libdir_flag_spec='${wl}-bnolibpath
+${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # Warning - without using the other run time loading flags, -berok will
+ # link without error, but may produce a broken library.
+ allow_undefined_flag=" ${wl}-berok"
+ fi
+ fi
+
+ # It seems that -bexpall can do strange things, so it is better to
+ # generate a list of symbols to export.
+ always_export_symbols=yes
+ archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs
+$linkopts ${allow_undef
+ ined_flag}'" $no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ ;;
+
amigaos*)
archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" >
$objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >>
$objdir/a2ixlibrary.data~$echo "#define VERSION $major" >>
$objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >>
$objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary
-32)'
***************
*** 1819,1832 ****
;;
! aix4*)
! version_type=linux
# AIX has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
! # We preserve .a as extension for shared libraries though AIX4.2
! # and later linker supports .so
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.a'
! shlibpath_var=LIBPATH
! deplibs_check_method=pass_all
;;
--- 1875,1900 ----
;;
! aix4* | aix5*)
# AIX has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
! version_type=linux
! if test "$host_cpu" = ia64; then
! # AIX 5 supports IA64
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.so'
! shlibpath_var=LD_LIBRARY_PATH
! else
! if test "$aix_use_runtimelinking" = yes; then
! # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
! # lib<name>.a to let people know that these are not typical AIX shared
libraries.
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.so'
! else
! # We preserve .a as extension for shared libraries though AIX4.2
! # and later linker supports .so
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.a'
! fi
! shlibpath_var=LIBPATH
! deplibs_check_method=pass_all
! fi
;;
diff -C 2 -r rpm-4.0.2/macros.in rpm-4.0.2/macros.in
*** macros.in Mon Dec 11 19:40:56 2000
--- macros.in Wed Sep 25 15:00:51 2002
***************
*** 113,117 ****
#
# XXX Note escaped %% for use in headerSprintf
! %_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%_signature none
%_sourcedir %{_topdir}/SOURCES
--- 113,118 ----
#
# XXX Note escaped %% for use in headerSprintf
! %_rpmfilename %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{OS}.%%{ARCH}.rpm
!
%_signature none
%_sourcedir %{_topdir}/SOURCES
***************
*** 119,123 ****
%_srcrpmdir %{_topdir}/SRPMS
%_tmppath %{_var}/tmp
! %_topdir %{_usrsrc}/redhat
%_unzipbin @UNZIPBIN@
--- 120,124 ----
%_srcrpmdir %{_topdir}/SRPMS
%_tmppath %{_var}/tmp
! %_topdir %{_usrsrc}/packages
%_unzipbin @UNZIPBIN@
diff -C 2 -r rpm-4.0.2/rpmrc.in rpm-4.0.2/rpmrc.in
*** rpmrc.in Thu Feb 22 19:03:02 2001
--- rpmrc.in Wed Sep 25 16:06:17 2002
***************
*** 143,147 ****
--- 143,149 ----
buildarchtranslate: powerpc: ppc
buildarchtranslate: powerppc: ppc
+ buildarchtranslate: rs6000: ppc
+
buildarchtranslate: alphaev5: alpha
buildarchtranslate: alphaev56: alpha
***************
*** 197,202 ****
arch_compat: sparc: noarch
! arch_compat: ppc: rs6000
! arch_compat: rs6000: noarch
arch_compat: mipseb: noarch
arch_compat: mipsel: noarch
--- 199,205 ----
arch_compat: sparc: noarch
! arch_compat: ppc: rs6000 noarch
! arch_compat: rs6000: ppc noarch
!
arch_compat: mipseb: noarch
arch_compat: mipsel: noarch
***************
*** 251,254 ****
--- 254,263 ----
os_compat: bsdi4.0: bsdi
+ # AIX 5.2 amd 5.3 do not exist yet, but might as well take care of it now
+ os_compat: aix5.3: aix5.2 aix5.1 aix5.0 aix4.3
+ os_compat: aix5.2: aix5.1 aix5.0 aix4.3
+ os_compat: aix5.1: aix5.0 aix4.3
+ os_compat: aix5.0: aix4.3
+
buildarch_compat: ia64: noarch
***************
*** 276,279 ****
--- 285,289 ----
buildarch_compat: m68k: noarch
buildarch_compat: ppc: noarch
+ buildarch_compat: rs6000: ppc noarch
buildarch_compat: mipsel: noarch
buildarch_compat: mipseb: noarch
diff -C 2 -r rpm-4.0.2/lib/rpmrc.c rpm-4.0.2/lib/rpmrc.c
*** lib/rpmrc.c Wed Sep 25 11:58:55 2002
--- lib/rpmrc.c Wed Sep 25 15:14:21 2002
***************
*** 960,964 ****
#endif
if (!strcmp(un.sysname, "AIX")) {
! strcpy(un.machine, __power_pc() ? "ppc" : "rs6000");
sprintf(un.sysname,"aix%s.%s",un.version,un.release);
}
--- 960,967 ----
#endif
if (!strcmp(un.sysname, "AIX")) {
! if (strcmp(un.machine,"ia64")) {
! strcpy(un.machine, __power_pc() ? "ppc" : "rs6000");
! }
!
sprintf(un.sysname,"aix%s.%s",un.version,un.release);
}
diff -C 2 -r rpm-4.0.2/popt/config.guess rpm-4.0.2/popt/config.guess
*** popt/config.guess Wed Sep 25 11:56:03 2002
--- popt/config.guess Wed Sep 25 15:17:19 2002
***************
*** 545,548 ****
--- 545,554 ----
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
+ ia64:AIX:*:5)
+ echo ia64-intel-aix5.${UNAME_RELEASE}
+ exit 0 ;;
+ *:AIX:*:5)
+ echo powerpc-ibm-aix5.${UNAME_RELEASE}
+ exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
diff -C 2 -r rpm-4.0.2/popt/config.sub rpm-4.0.2/popt/config.sub
*** popt/config.sub Wed Sep 25 11:56:03 2002
--- popt/config.sub Wed Sep 25 15:18:38 2002
***************
*** 559,562 ****
--- 559,565 ----
os=-proelf
;;
+ ia64*)
+ basic_machine=ia64-intel
+ ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
diff -C 2 -r rpm-4.0.2/popt/ltconfig rpm-4.0.2/popt/ltconfig
*** popt/ltconfig Fri Feb 23 22:43:40 2001
--- popt/ltconfig Wed Sep 25 15:54:14 2002
***************
*** 697,703 ****
# PORTME Check for PIC flags for the system compiler.
case "$host_os" in
! aix3* | aix4*)
# All AIX code is PIC.
! link_static_flag='-bnso -bI:/lib/syscalls.exp'
;;
--- 697,710 ----
# PORTME Check for PIC flags for the system compiler.
case "$host_os" in
! aix3* | aix4* | aix5*)
# All AIX code is PIC.
! case "$host_cpu" in
! ia64) # AIX 5 now supports IA64 processor
! link_static_flag='-Bstatic'
! ;;
! *) #
! link_static_flag='-bnso -bI:/lib/syscalls.exp'
! ;;
! esac
;;
***************
*** 1116,1120 ****
# See if GNU ld supports shared libraries.
case "$host_os" in
! aix3* | aix4*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
--- 1123,1127 ----
# See if GNU ld supports shared libraries.
case "$host_os" in
! aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
***************
*** 1277,1282 ****
;;
! aix4*)
! hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b
${wl}libpath:$libdir:/usr/lib:/lib'
hardcode_libdir_separator=':'
if test "$with_gcc" = yes; then
--- 1284,1288 ----
;;
! aix4* | aix5*)
hardcode_libdir_separator=':'
if test "$with_gcc" = yes; then
***************
*** 1299,1305 ****
shared_flag='-shared'
else
! shared_flag='${wl}-bM:SRE'
hardcode_direct=yes
fi
allow_undefined_flag=' ${wl}-berok'
archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts
${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
--- 1305,1357 ----
shared_flag='-shared'
else
! if test "$host_cpu" = ia64; then
! shared_flag='${wl}-G'
! else
! shared_flag='${wl}-bM:SRE'
! fi
hardcode_direct=yes
fi
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # Test if we are trying to use run time linking, or normal AIX style linking.
+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
+ aix_use_runtimelinking=no
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ exp_sym_flag='-bexport'
+ no_entry_flag='${wl}-bnoentry'
+ fi
+
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ allow_undefined_flag=' -Wl,-G'
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag=" ${wl}-z nodefs"
+ else
+ hardcode_libdir_flag_spec='${wl}-bnolibpath
+${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # Warning - without using the other run time loading flags, -berok will
+ # link without error, but may produce a broken library.
+ allow_undefined_flag=" ${wl}-berok"
+ fi
+ fi
+
+ # It seems that -bexpall can do strange things, so it is better to
+ # generate a list of symbols to export.
+ always_export_symbols=yes
+ archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs
+$linkopts ${allow_undefined_flag}'" $no_entry_flag
+\${wl}$exp_sym_flag:\$export_symbols"
+ ;;
+
+
allow_undefined_flag=' ${wl}-berok'
archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts
${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
***************
*** 1819,1832 ****
;;
! aix4*)
! version_type=linux
# AIX has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
! # We preserve .a as extension for shared libraries though AIX4.2
! # and later linker supports .so
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.a'
! shlibpath_var=LIBPATH
! deplibs_check_method=pass_all
;;
--- 1871,1896 ----
;;
! aix4* | aix5*)
# AIX has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
! version_type=linux
! if test "$host_cpu" = ia64; then
! # AIX 5 supports IA64
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.so'
! shlibpath_var=LD_LIBRARY_PATH
! else
! if test "$aix_use_runtimelinking" = yes; then
! # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
! # lib<name>.a to let people know that these are not typical AIX shared
libraries.
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.so'
! else
! # We preserve .a as extension for shared libraries though AIX4.2
! # and later linker supports .so
! library_names_spec='${libname}${release}.so$versuffix
${libname}${release}.so$major $libname.a'
! fi
! shlibpath_var=LIBPATH
! deplibs_check_method=pass_all
! fi
;;
Regards,
-- martin
Dipl.-Phys. Martin Konold
e r f r a k o n
Erlewein, Frank, Konold & Partner - Beratende Ingenieure und Physiker
Germanenstra�e 15, 70563 Stuttgart, Germany
mobil: 0175 4148693
fax: 0175 13 4148693
email: [EMAIL PROTECTED]
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Developer Communication List [EMAIL PROTECTED]