Enable static build 62/230562/4 accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix tizen_6.0_base tizen_6.0_base_hotfix accepted/tizen/6.0/base/20201029.110705 accepted/tizen/6.0/base/20230713.142849 accepted/tizen/6.0/base/tool/20201029.112058 accepted/tizen/6.0/base/tool/hotfix/20201030.124902 accepted/tizen/6.0/base/tool/hotfix/20201102.090110 accepted/tizen/6.5/base/tool/20211027.115339 accepted/tizen/base/20200419.223850 submit/tizen_6.0_base/20201029.184801 submit/tizen_6.0_base_hotfix/20201030.192501 submit/tizen_6.0_base_hotfix/20201102.162701 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.200601 submit/tizen_base/20200416.121222 tizen_6.0.m2_release tizen_6.5.m2_release
authorSlava Barinov <v.barinov@samsung.com>
Wed, 15 Apr 2020 11:43:14 +0000 (14:43 +0300)
committerSlava Barinov <v.barinov@samsung.com>
Wed, 15 Apr 2020 15:19:33 +0000 (18:19 +0300)
guile binary must be static to provide support for qemu-accel
environment and run build in cross-build environments

Change-Id: Ide6d9208802bf77dbcfce0daf9d2e2cd84313cad
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
configure.ac
libguile/Makefile.am
packaging/baselibs.conf [new file with mode: 0644]
packaging/gmp-6.1.1.tar.bz2 [deleted file]
packaging/guile.spec

index 9073deba040fd6dbc299d708c668e382d8b58d87..c66503bfb48e1d95897f370315005c0c63fc1025 100644 (file)
@@ -1581,11 +1581,14 @@ if test "$cross_compiling" = "yes"; then
 fi
 
 ## No need as yet to be more elaborate
-CCLD_FOR_BUILD="$CC_FOR_BUILD"
+CCLD_FOR_BUILD="$CC_FOR_BUILD -all-static"
 
 AC_SUBST(cross_compiling)
 AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
 AC_SUBST(CCLD_FOR_BUILD)
+
+CCLD="$CC -all-static"
+AC_SUBST(CCLD)
        
 ## libtool erroneously calls CC_FOR_BUILD HOST_CC;
 ## --HOST is the platform that PACKAGE is compiled for.
index 0fceee0e6358e28359efc8907bcab47ce31175b6..668c2d628d14b7eda6aefa31da0bddac71111e78 100644 (file)
@@ -112,11 +112,11 @@ guile_filter_doc_snarfage$(EXEEXT): $(guile_filter_doc_snarfage_OBJECTS) $(guile
 
 
 guile_SOURCES = guile.c
-guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
+guile_CFLAGS = -Wl,--whole-archive -Wl,--allow-multiple-definition $(GUILE_CFLAGS) $(AM_CFLAGS)
 guile_LDADD = libguile-@GUILE_EFFECTIVE_VERSION@.la
-guile_LDFLAGS = $(GUILE_CFLAGS)
+guile_LDFLAGS = -Wl,--whole-archive -Wl,--allow-multiple-definition $(GUILE_CFLAGS) -Wl,--no-whole-archive -lc
 
-libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
+libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS = -Wl,--whole-archive -Wl,--allow-multiple-definition $(GUILE_CFLAGS) $(AM_CFLAGS)
 
 libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES =                                \
        alist.c                                 \
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..3ed9a26
--- /dev/null
@@ -0,0 +1,6 @@
+arch x86_64 targets i586:64bit
+arch i586 targets x86_64:32bit
+
+guile
+  autoreqprov off
+  +/
diff --git a/packaging/gmp-6.1.1.tar.bz2 b/packaging/gmp-6.1.1.tar.bz2
deleted file mode 100644 (file)
index 912b137..0000000
Binary files a/packaging/gmp-6.1.1.tar.bz2 and /dev/null differ
index 46e7d4c1e1527266ff2fc36c39504adae7968fca..e73146377ff6ca2bd842c566dfe3c882e1af3389 100644 (file)
@@ -1,17 +1,21 @@
-%define gmpver 6.1.1
+%define keepstatic 1
 %define guilevers 2.2
 %define guilesubvers 6
 
 Name:           guile
-BuildRequires:  libgc-devel
-BuildRequires:  libffi-devel
+BuildRequires:  libgc-devel-static
+BuildRequires:  libffi-devel-static
 BuildRequires:  libltdl-devel
-BuildRequires:  libunistring-devel
+BuildRequires:  libunistring-devel-static
 BuildRequires:  pkg-config
 BuildRequires:  readline-devel
 BuildRequires:  glibc-extra
 BuildRequires:  glibc-i18ndata
 BuildRequires:  flex gettext-tools gettext-runtime glibc-locale
+BuildRequires:  glibc-devel-static
+BuildRequires:  gcc-devel-static
+BuildRequires:  libunistring-devel-static
+BuildRequires:  gmp-devel
 Requires:       glibc-locale
 BuildRequires:  makeinfo
 Version:        %{guilevers}.%{guilesubvers}
@@ -21,9 +25,7 @@ License:        GFDL-1.3 and GPL-3.0+ and LGPL-3.0+
 Group:          Development/Languages/Scheme
 Url:            http://www.gnu.org/software/guile/
 Source0:        %{name}-%{version}.tar.gz
-Source1:        gmp-%{gmpver}.tar.bz2
 Source1001:     %{name}.manifest
-ExcludeArch:    %arm aarch64
 
 %description
 This is Guile, a portable, embeddable Scheme implementation written in
@@ -75,25 +77,20 @@ linked in as a library when building extensible programs.
 %prep
 %setup -q
 cp %{SOURCE1001} .
-tar xfvj %{SOURCE1}
 
 %build
-pushd gmp-%{gmpver}
 %reconfigure \
-       --enable-static \
-       --with-pic \
-       --prefix="%{_builddir}/gmp-install" \
-       --disable-shared
-
-%{__make} %{?_smp_mflags}
-%{__make} install DESTDIR=%{_builddir}/gmp-install
-popd
-
-%reconfigure \
-       --disable-static --enable-shared --with-pic \
-       --disable-silent-rules \
-       --with-libgmp-prefix="%{_builddir}/gmp-install/%{_prefix}" \
-       PACKAGE_VERSION=%{version}
+        --enable-static --disable-shared --with-pic \
+        --disable-silent-rules \
+        --without-libgmp-prefix \
+        --without-libltdl-prefix \
+        ac_cv_libltdl=yes \
+        ac_cv_libunistring=yes \
+        ac_cv_libunistring_with_iconv_support=yes \
+        PACKAGE_VERSION=%{version} \
+        CFLAGS="${CFLAGS} -static -Wno-error" \
+        CXXFLAGS="${CXXFLAGS} -static -Wno-error" \
+        LDFLAGS="-static -pthread"
 
 %{__make} %{?_smp_mflags}
 
@@ -101,10 +98,8 @@ popd
 #LD_LIBRARY_PATH="." make check
 
 %install
-make install DESTDIR=$RPM_BUILD_ROOT
+%make_install
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/guile/site
-find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
-
 %post -n libguile -p /sbin/ldconfig
 
 %postun -n libguile -p /sbin/ldconfig
@@ -143,5 +138,4 @@ find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
 %doc %{_infodir}/%{name}.info-[0-9].gz
 %doc %{_infodir}/%{name}.info-1[0-9].gz
 %doc %{_infodir}/r5rs.info.gz
-%{_libdir}/libguile-%{guilevers}.so
 %{_libdir}/pkgconfig/guile-%{guilevers}.pc