shared libs

This commit is contained in:
espie 2001-09-15 11:51:35 +00:00
parent c69eabf032
commit 82cc44ae52
13 changed files with 179 additions and 18 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.47 2001/09/10 23:55:13 miod Exp $ # $OpenBSD: Makefile,v 1.48 2001/09/15 11:51:35 espie Exp $
# This is a configuration file for egcs # This is a configuration file for egcs
@ -54,10 +54,10 @@ PERMIT_DISTFILES_CDROM=Yes
# and g77-tests only holds duplicates from the main testsuite archive. # and g77-tests only holds duplicates from the main testsuite archive.
#MAKE_TESTS=yes #MAKE_TESTS=yes
MAKE_GXX=Yes MAKE_GXX=Yes
#MAKE_FORTRAN=Yes MAKE_FORTRAN=Yes
# we don't care about chill # we don't care about chill
#MAKE_CHILL=yes #MAKE_CHILL=yes
#MAKE_OBJC=Yes MAKE_OBJC=Yes
#MAKE_JAVA=Yes #MAKE_JAVA=Yes
MULTI_PACKAGES= MULTI_PACKAGES=
@ -163,6 +163,7 @@ post-patch:
cd ${WRKSRC}/libf2c/libI77 && PATH=${PORTPATH} autoconf cd ${WRKSRC}/libf2c/libI77 && PATH=${PORTPATH} autoconf
cd ${WRKSRC}/libffi && PATH=${PORTPATH} autoconf cd ${WRKSRC}/libffi && PATH=${PORTPATH} autoconf
cd ${WRKSRC}/fastjar && PATH=${PORTPATH} autoconf cd ${WRKSRC}/fastjar && PATH=${PORTPATH} autoconf
cd ${WRKSRC}/libjava && PATH=${PORTPATH} autoconf
cd ${WRKSRC} && rm -rf texinfo cd ${WRKSRC} && rm -rf texinfo
cd ${WRKSRC} && rm -rf zlib cd ${WRKSRC} && rm -rf zlib
@ -250,6 +251,7 @@ USE_GMAKE= yes
ALL_TARGET=bootstrap ALL_TARGET=bootstrap
#ALL_TARGET=bootstrap3 #ALL_TARGET=bootstrap3
# ALL_TARGET=bootstrap-lean # ALL_TARGET=bootstrap-lean
MAKE_FLAGS=libstdc___la_LDFLAGS='-version-info 31:0:0 -lm'
FAKE_FLAGS=DESTDIR=${WRKINST} FAKE_FLAGS=DESTDIR=${WRKINST}
@ -299,6 +301,6 @@ RUN_DEPENDS+=egcc::lang/egcs/stable
. endif . endif
.endif .endif
SUBST_VARS=OSREV V SUBST_VARS=V OSREV
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure_in,v 1.1 2001/07/09 10:26:19 espie Exp $ $OpenBSD: patch-configure_in,v 1.2 2001/09/15 11:51:35 espie Exp $
--- configure.in.orig Fri Jul 6 11:44:32 2001 --- configure.in.orig Mon Aug 13 18:14:49 2001
+++ configure.in Fri Jul 6 11:45:36 2001 +++ configure.in Wed Aug 22 09:35:20 2001
@@ -983,6 +983,8 @@ case "${target}" in @@ -992,6 +992,8 @@ case "${target}" in
configdirs="$configdirs grez" configdirs="$configdirs grez"
noconfigdirs="$noconfigdirs ${libgcj}" noconfigdirs="$noconfigdirs ${libgcj}"
;; ;;

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-libffi_src_x86_sysv_S,v 1.3 2001/09/15 11:51:35 espie Exp $
--- libffi/src/x86/sysv.S.orig Fri Sep 14 23:50:39 2001
+++ libffi/src/x86/sysv.S Fri Sep 14 23:50:50 2001
@@ -129,7 +129,8 @@ epilogue:
.ffi_call_SYSV_end:
.size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
-.section .eh_frame,"aw",@progbits
+/* .section .eh_frame,"aw",@progbits */
+.data
__FRAME_BEGIN__:
.4byte .LLCIE1
.LSCIE1:

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libstdc++-v3_libmath_Makefile_am,v 1.1 2001/09/15 11:51:35 espie Exp $
--- libstdc++-v3/libmath/Makefile.am.orig Thu Jul 26 20:25:42 2001
+++ libstdc++-v3/libmath/Makefile.am Fri Sep 14 23:13:05 2001
@@ -39,7 +39,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_L
libmath_la_SOURCES = signbit.c signbitf.c stubs.c
-LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link --tag CC "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+# Need to explicitly set LTCOMPILE to make sure libtool uses the correct
+# configuration
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag CC $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libstdc++-v3_libmath_Makefile_am.orig,v 1.1 2001/09/15 11:51:35 espie Exp $
--- libstdc++-v3/libmath/Makefile.am.orig Thu Jul 26 20:25:42 2001
+++ libstdc++-v3/libmath/Makefile.am Wed Sep 12 20:38:03 2001
@@ -39,7 +39,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_L
libmath_la_SOURCES = signbit.c signbitf.c stubs.c
-LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link --tag CC "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+# Need to explicitly set LTCOMPILE to make sure libtool uses the correct
+# configuration
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag CC $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@

View File

@ -1,15 +1,15 @@
$OpenBSD: patch-libstdc++-v3_libmath_Makefile_in,v 1.2 2001/08/22 09:03:04 espie Exp $ $OpenBSD: patch-libstdc++-v3_libmath_Makefile_in,v 1.3 2001/09/15 11:51:35 espie Exp $
--- libstdc++-v3/libmath/Makefile.in.orig Mon May 14 21:49:10 2001 --- libstdc++-v3/libmath/Makefile.in.orig Tue Aug 14 00:22:26 2001
+++ libstdc++-v3/libmath/Makefile.in Sat Jul 14 16:02:28 2001 +++ libstdc++-v3/libmath/Makefile.in Fri Sep 14 23:13:05 2001
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
@@ -131,7 +131,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_L @@ -141,7 +141,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_L
libmath_la_SOURCES = signbit.c signbitf.c
libmath_la_SOURCES = signbit.c signbitf.c stubs.c
-LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ -LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link --tag CC "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --mode=link --tag CC "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
@ -19,9 +19,9 @@ $OpenBSD: patch-libstdc++-v3_libmath_Makefile_in,v 1.2 2001/08/22 09:03:04 espie
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag CC $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile --tag CC $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES # Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDE_DIR = @GLIBCPP_INCLUDE_DIR@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
@@ -157,7 +161,6 @@ libmath_la_LDFLAGS = @@ -161,7 +165,6 @@ libmath_la_LDFLAGS =
libmath_la_OBJECTS = signbit.lo signbitf.lo libmath_la_OBJECTS = signbit.lo signbitf.lo stubs.lo
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-libstdc++-v3_libmath_Makefile_in.orig,v 1.1 2001/09/15 11:51:35 espie Exp $
--- libstdc++-v3/libmath/Makefile.in.orig Tue Aug 14 00:22:26 2001
+++ libstdc++-v3/libmath/Makefile.in Wed Sep 12 20:38:03 2001
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -141,7 +141,11 @@ libmath_la_DEPENDENCIES = $(libmath_la_L
libmath_la_SOURCES = signbit.c signbitf.c stubs.c
-LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link --tag CC "$(CCLD)" $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+# Need to explicitly set LTCOMPILE to make sure libtool uses the correct
+# configuration
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag CC $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
@@ -161,7 +165,6 @@ libmath_la_LDFLAGS =
libmath_la_OBJECTS = signbit.lo signbitf.lo stubs.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
DIST_COMMON = Makefile.am Makefile.in

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libtool_m4,v 1.1 2001/09/15 11:51:35 espie Exp $
--- libtool.m4.orig Wed Aug 22 11:19:01 2001
+++ libtool.m4 Wed Aug 22 11:19:46 2001
@@ -620,6 +620,10 @@ newsos6)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
+openbsd*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-ltcf-c_sh,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltcf-c.sh.orig Wed Aug 22 11:20:15 2001
+++ ltcf-c.sh Wed Aug 22 11:21:49 2001
@@ -467,10 +467,13 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ remove_lgcc=yes
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
;;
os2*)

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-ltcf-cxx_sh,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltcf-cxx.sh.orig Wed Aug 22 11:21:59 2001
+++ ltcf-cxx.sh Wed Aug 22 11:22:55 2001
@@ -391,6 +391,19 @@ case $host_os in
netbsd*)
# NetBSD uses g++ - do we need to do anything?
;;
+ openbsd*)
+ if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+ # MM: OpenBSD 2.7 uses G++, but not GNU ld
+ archive_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ archive_expsym_cmds='$CC $pic_flag -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ old_archive_cmds="$old_archive_cmds~"'$RANLIB $oldlib'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ remove_lgcc=yes
+ output_verbose_link_cmds='$CC $ac_cv_prog_cc_pic -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ fi
+ ;;
osf3*)
case $cc_basename in
KCC)

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-ltconfig,v 1.1 2001/09/15 11:51:35 espie Exp $
--- ltconfig.orig Wed Aug 22 11:13:16 2001
+++ ltconfig Wed Aug 22 11:18:30 2001
@@ -625,7 +625,12 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds";;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds";;
+ esac
fi
# Source the script associated with the $tagname tag configuration.
@@ -1255,6 +1260,9 @@ openbsd*)
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ deplib_check_method=pass_all
+ sys_lib_dlsearch_path_spec='/usr/lib /usr/local/lib /usr/X11R6/lib'
;;
os2*)

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared-c++,v 1.1 2001/09/15 11:51:35 espie Exp $
lib/libstdc++.so.3.1

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.6 2001/09/01 11:43:06 fgsch Exp $ @comment $OpenBSD: PLIST,v 1.7 2001/09/15 11:51:35 espie Exp $
@option no-default-conflict @option no-default-conflict
@pkgcfl egcs-*-core @pkgcfl egcs-*-core
@pkgcfl gcc-*-core @pkgcfl gcc-*-core
@ -75,7 +75,6 @@ lib/libiberty.a
man/man1/cpp.1 man/man1/cpp.1
man/man1/egcc.1 man/man1/egcc.1
man/man1/gcov.1 man/man1/gcov.1
%%SHARED%%
@dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/include/machine @dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/include/machine
@dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/include @dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/include
@dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/fpic @dirrm lib/gcc-lib/${MACHINE_ARCH}-unknown-openbsd${OSREV}/${V}/fpic