Compare commits

...

27 Commits

Author SHA1 Message Date
openeuler-ci-bot 095de3e893 !35 fix building packages without libltdl.la
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-05-20 04:02:33 +00:00
Funda Wang c15ca66992 fix building packages without libltdl.la 2025-04-04 20:04:44 +08:00
openeuler-ci-bot 55bdc169d5 !33 [sync] PR-31: add sw_64 support
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-03-17 04:23:51 +00:00
Hailiang 5c8bc2ff61 add sw_64 support
(cherry picked from commit cc2c5df69d)
2025-03-17 10:59:04 +08:00
openeuler-ci-bot 326b003b4f !27 update to 2.5.4
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-11-21 06:46:56 +00:00
Funda Wang 2c8d3558b5 2.5.4 2024-11-21 10:53:27 +08:00
openeuler-ci-bot 9de8fa7f8a !23 update to 2.5.3
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-10-09 00:56:06 +00:00
Funda Wang 8c7fae2ef3 2.5.3 2024-10-08 17:57:10 +08:00
openeuler-ci-bot 05aaafb0e7 !22 pass -Wl,xxx options before libraries
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-10-08 08:50:40 +00:00
Funda Wang 50fc2e7ba9 pass -Wl,xxx options before libraries 2024-09-26 22:53:38 +08:00
openeuler-ci-bot 5363da0508 !20 riscv64: fortran编译选项增加-fPIC
From: @laokz 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-06-07 06:55:45 +00:00
laokz daecd4d3b6 add -fPIC to fortran flags for riscv
Signed-off-by: misaka00251 <liuxin@iscas.ac.cn>
2023-06-06 03:52:27 +00:00
openeuler-ci-bot dd434c86d4 !19 tests/link-order.at: avoid warning and test failure with GNU grep 3.8
From: @renxichen 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2023-02-02 02:11:18 +00:00
renxichen 385dfa5c67 tests/link-order.at: avoid warning and test failure with GNU grep 3.8 2023-02-02 09:36:01 +08:00
openeuler-ci-bot 38ba51a877 !18 [sync] PR-17: upgrade version to 2.4.7
From: @renxichen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-11-04 07:16:33 +00:00
renxichen e070ce380f upgrade version to 2.4.7 2022-11-04 14:37:52 +08:00
openeuler-ci-bot 4fb533ba0c !12 update license from GFDL to GFDLv1.3+
From: @renxichen 
Reviewed-by: @licihua 
Signed-off-by: @licihua
2022-04-22 07:12:00 +00:00
rwx403335 8f5dd00b09 update license from GFDL to GFDLv1.3+ 2022-04-22 11:17:38 +08:00
openeuler-ci-bot 4d8799a977 !11 remove BuildRequires gdb
From: @xinyingchao
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-07-23 06:28:21 +00:00
Zhiqiang Liu 6a47a5ed7a remove BuildRequires gdb 2021-07-23 11:46:59 +08:00
openeuler-ci-bot a8d4e9d1cf !6 bugfix testcase fail for gfortan
Merge pull request !6 from tianwei/master
2020-08-20 16:53:21 +08:00
zzm_567 ee10b66a9d bugfix testcase for gfortan 2020-08-20 15:39:49 +08:00
zzm_567 235a521808 bugfix testcase for gfortan 2020-08-20 15:39:43 +08:00
openeuler-ci-bot 99ef4d2f97 !5 add yaml file in package
Merge pull request !5 from 吴超超/master
2020-07-21 11:58:01 +08:00
19909236985 c47b585d29 add yaml file in package 2020-06-12 15:37:55 +08:00
openeuler-ci-bot 1fe607a71b !4 add necessary BuildRequires
Merge pull request !4 from chengquan/developer
2020-03-20 15:25:20 +08:00
chengquan a8dfb8aee5 add necessary BuildRequires 2020-03-19 19:41:20 +08:00
11 changed files with 205 additions and 127 deletions
+39
View File
@@ -0,0 +1,39 @@
From 80ff97af5d5686e071816af16f65d98af5116238 Mon Sep 17 00:00:00 2001
From: Hailiang <mahailiang@uniontech.com>
Date: Tue, 11 Mar 2025 13:43:07 +0800
Subject: [PATCH] add sw_64 support
---
build-aux/config.guess | 3 +++
build-aux/config.sub | 1 +
2 files changed, 4 insertions(+)
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 48a6846..a5fa853 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1186,6 +1186,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
+ sw_64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
tile*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 4aaae46..ada8a42 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1432,6 +1432,7 @@ case $cpu-$vendor in
| spu \
| sv1 \
| sx* \
+ | sw_64 \
| tahoe \
| thumbv7* \
| tic30 \
--
2.20.1
-35
View File
@@ -1,35 +0,0 @@
Ensure that $(LIBLTDL) is built first
After Automake upstream commit f4e91bfc490d, the list in 'all-am:' is
reordered for this test-case (*_LTLIBRARIES is before *_PROGRAMS), which
means that linker will fail to link 'old' binary.
Previously (with automake <= 1.16), it was matter of luck -- it worked if
(a) the build was serial (-j1), and/or (b) libtool-ltdl-devel package was
installed on the box so ./configure picked the system version of libltdl.
Users should anyways use system's ltdl, so this has low priority.
diff --git a/tests/old-ltdl-iface.at b/tests/old-ltdl-iface.at
index cee29089..6f9c8001 100644
--- a/tests/old-ltdl-iface.at
+++ b/tests/old-ltdl-iface.at
@@ -62,6 +62,9 @@ MOSTLYCLEANFILES =
include ltdl/Makefile.inc
bin_PROGRAMS = old
old_LDADD = -Lltdl $(LIBLTDL)
+# TODO: if --with-included-ltdl was unused this would
+# generate useless dependency.
+old_DEPENDENCIES = $(LIBLTDL)
]])
AT_DATA([old.c],
@@ -131,7 +134,7 @@ LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], [exp
AT_CHECK([test -f ltdl/Makefile.inc])
-LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force], [--with-included-ltdl])
LT_AT_EXEC_CHECK([./old], 0, [[...]])
@@ -0,0 +1,53 @@
Enabling lto will result in failure during test phase, to be precise test 67 will cause it.
Compiler flags for this test (and most likely for rest of them) are inherited from actual build phase.
I'm not sure if this is expected.
Most distribution disables this test. We try to keep it by stripping lto flags for it.
Origin for this tests: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391427
--- a/tests/link-order2.at 2015-01-16 19:52:04.000000000 +0100
+++ b/tests/link-order2_new.at 2021-11-30 02:01:09.574451906 +0100
@@ -47,6 +47,8 @@
AT_KEYWORDS([libtool])
AT_KEYWORDS([interactive])dnl running 'wrong' may cause a popup window.
+NO_LTO_CFLAGS=${CFLAGS/-flto*-ffat-lto-objects }
+
eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='`
undefined_setting=-no-undefined
@@ -89,12 +91,12 @@
EOF
for file in a0 a1 b; do
- $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c
+ $LIBTOOL --mode=compile $CC $CPPFLAGS $NO_LTO_CFLAGS -c $file.c
done
-$CC $CPPFLAGS $CFLAGS -c main.c
+$CC $CPPFLAGS $NO_LTO_CFLAGS -c main.c
# Build an old, installed library.
-$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
+$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir
$LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la
$LIBTOOL --mode=clean rm -f liba0.la
@@ -118,13 +120,13 @@
esac
test non-libtool,-static-libtool-libs = "$type_of_depdepl,$static" &&
static=-all-static
- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
- $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0],
+ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir
+ $LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir
+ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0],
[], [ignore], [ignore])
LT_AT_EXEC_CHECK([./main])
# Now test that if we reverse the link order, the program fails.
- AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la],
+ AT_CHECK([$LIBTOOL --mode=link $CC $NO_LTO_CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la],
[], [ignore], [ignore])
if test yes, != "$shared_fails,$static"; then
LT_AT_EXEC_CHECK([./wrong], [1], [], [ignore], [|| (exit 1)])
@@ -0,0 +1,17 @@
diff -up ./m4/ltdl.m4.orig ./m4/ltdl.m4
--- ./m4/ltdl.m4.orig 2016-02-11 20:40:28.013253981 +0200
+++ ./m4/ltdl.m4 2016-02-11 20:41:07.142760471 +0200
@@ -282,8 +282,11 @@ AC_ARG_WITH([ltdl_lib],
[use the libltdl.la installed in DIR])])
if test -n "$with_ltdl_lib"; then
- if test -f "$with_ltdl_lib/libltdl.la"; then :
- else
+ # check for the existence of "$with_ltdl_lib/libltdl.la" while
+ # allowing people to delete the libtool archive file (which isn't
+ # useful in this case in many common platforms.)
+ with_ltdl_lib_libname=`echo "$with_ltdl_lib"/libltdl.*`
+ if test "x$with_ltdl_lib_libname" = "x$with_ltdl_lib/libltdl.*"; then
AC_MSG_ERROR([invalid ltdl library directory: '$with_ltdl_lib'])
fi
else
Binary file not shown.
@@ -11,14 +11,14 @@ diff --git a/m4/libtool.m4 b/m4/libtool.m4
index f796d7b..41dd20a 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2866,6 +2866,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
@@ -2930,6 +2930,9 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
+ # Add ABI-specific directories to the system library path.
+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
# Ideally, we could use ldconfig to report *all* directores which are
# Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
@@ -2874,7 +2877,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Binary file not shown.
@@ -1,31 +0,0 @@
From 350082b6aa89f9ef603fcebbb4cf33f15a743f2f Mon Sep 17 00:00:00 2001
From: Bert Wesarg <bert.wesarg@googlemail.com>
Date: Mon, 13 Jun 2016 22:28:47 +0200
Subject: [PATCH] libtool: exit verbosely for fatal configure problems
Instead of calling not-existing function and processing subsequent
shell code.
* build-aux/ltmain.in (func_fatal_configuration): Fix typo in
func_fatal_error call.
Copyright-paperwork-exempt: Yes
---
build-aux/ltmain.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 0ad021d..c3058f2 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -212,7 +212,7 @@ fi
# a configuration failure hint, and exit.
func_fatal_configuration ()
{
- func__fatal_error ${1+"$@"} \
+ func_fatal_error ${1+"$@"} \
"See the $PACKAGE documentation for more information." \
"Fatal configuration error."
}
--
1.8.3.1
-36
View File
@@ -1,36 +0,0 @@
From 702a97fbb09bd7088a50f2b239016d1e32843c24 Mon Sep 17 00:00:00 2001
From: Pavel Raiskup <praiskup@redhat.com>
Date: Fri, 18 Sep 2015 10:36:43 +0200
Subject: [PATCH] libtool: fix GCC linking with -specs=*
References:
https://bugzilla.redhat.com/show_bug.cgi?id=985592
* build-aux/ltmain.in (func_mode_link): Pass -specs=*
to the linker, Fedora uses this option for hardening.
Signed-off-by: Pavel Raiskup <praiskup@redhat.com>
---
build-aux/ltmain.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index d5cf07a..0c40da0 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5360,10 +5360,12 @@ func_mode_link ()
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
--
1.8.3.1
+90 -23
View File
@@ -2,30 +2,31 @@
%global gcc_major 7.3.0
Name: libtool
Version: 2.4.6
Release: 31
License: GPLv2+ and LGPLv2+ and GFDL
Version: 2.5.4
Release: 3
License: GPL-2.0-or-later AND LGPL-2.0-or-later and GFDL-1.3-or-later
Summary: The GNU Portable Library Tool
URL: http://www.gnu.org/software/libtool/
Source0: http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
URL: https://www.gnu.org/software/libtool/
Source0: https://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
Patch0: libtool-2.4.5-rpath.patch
Patch1: libtool-2.4.6-am-1.16-test.patch
Patch6000: libtool-exit-verbosely-for-fatal-configure-problems.patch
Patch6001: libtool-fix-GCC-linking-with-specs.patch
Patch0: libtool-2.5.3-rpath.patch
Patch1: libtool-2.4.6-disable-lto-link-order2.patch
Patch2: add-sw_64-support.patch
Patch3: libtool-2.4.6-fix-building-without-libltdl.la.patch
Requires: gcc(major),autoconf, automake, sed, tar, findutils
BuildRequires: texinfo,autoconf, automake,help2man
BuildRequires: libstdc++-devel, gcc-gfortran,gcc, gcc-c++
BuildRequires: texinfo autoconf automake help2man
BuildRequires: libstdc++-devel gcc-gfortran gcc gcc-c++
%description
GNU libtool is a generic library support script.
Libtool hides the complexity of using shared libraries behind a consistent, portable interface.
%package ltdl
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
Provides: %{name}-libs = %{version}-%{release}
License: LGPL-2.1-or-later
%description ltdl
The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a
@@ -34,11 +35,11 @@ process of using dynamic modules.
%package devel
Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
License: LGPLv2+
License: LGPL-2.0-or-later
Requires: automake
Requires: %{name}-ltdl = %{version}-%{release}
Provides: %{name}-ltdl-devel
Obsoletes: %{name}-ltdl-devel
Provides: %{name}-ltdl-devel = %{version}-%{release}
Obsoletes: %{name}-ltdl-devel < %{version}-%{release}
%description devel
Static libraries and header files for development with ltdl.
@@ -47,28 +48,40 @@ Static libraries and header files for development with ltdl.
%prep
%autosetup -n libtool-%{version} -p1
autoreconf -v
# Fix libtool to pass -Wl,xxx options before libraries
sed -i \
-e 's,$libobjs $deplibs $compiler_flags,$compiler_flags $libobjs $deplibs,' \
-e 's,$predep_objects $libobjs $deplibs $postdep_objects $compiler_flags,$compiler_flags $predep_objects $libobjs $deplibs $postdep_objects,' \
m4/libtool.m4
%build
autoreconf -v
export CC=gcc
export CXX=g++
export F77=gfortran
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export FFLAGS=$(echo "$RPM_OPT_FLAGS -I/usr/lib64/gfortran/modules"| sed 's/-fstack-protector-strong/ /g')
export FCFLAGS=$(echo "$RPM_OPT_FLAGS -I/usr/lib64/gfortran/modules"| sed 's/-fstack-protector-strong/ /g')
%ifarch x86_64
export FFLAGS="$RPM_OPT_FLAGS -fPIE"
export FCFLAGS="$RPM_OPT_FLAGS -fPIE"
%endif
%ifarch riscv64
export FFLAGS="$RPM_OPT_FLAGS -fPIC"
export FCFLAGS="$RPM_OPT_FLAGS -fPIC"
%endif
%configure
%make_build CUSTOM_LTDL_CFLAGS="%_hardening_cflags" CUSTOM_LTDL_LDFLAGS="%_hardening_ldflags"
%check
make check VERBOSE=yes
%make_build check VERBOSE=yes
%install
%make_install
%delete_la_and_a
rm -f %{buildroot}%{_infodir}/dir
rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%files
%license COPYING
@@ -86,20 +99,74 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%files devel
%license libltdl/COPYING.LIB
%doc libltdl/README
%{_datadir}/libtool
%exclude %{_datadir}/libtool/build-aux
%{_datadir}/libtool/COPYING.LIB
%{_datadir}/libtool/Makefile.am
%{_datadir}/libtool/Makefile.in
%{_datadir}/libtool/README
%{_datadir}/libtool/aclocal.m4
%{_datadir}/libtool/config-h.in
%{_datadir}/libtool/configure
%{_datadir}/libtool/configure.ac
%{_datadir}/libtool/libltdl
%{_datadir}/libtool/loaders
%{_datadir}/libtool/lt__alloc.c
%{_datadir}/libtool/lt__argz.c
%{_datadir}/libtool/lt__dirent.c
%{_datadir}/libtool/lt__strl.c
%{_datadir}/libtool/lt_dlloader.c
%{_datadir}/libtool/lt_error.c
%{_datadir}/libtool/ltdl.c
%{_datadir}/libtool/ltdl.h
%{_datadir}/libtool/ltdl.mk
%{_datadir}/libtool/slist.c
%{_includedir}/ltdl.h
%{_includedir}/libltdl
%{_libdir}/libltdl.so
%files help
%doc README
%{_infodir}/libtool.info*.gz
%{_infodir}/libtool.info*
%{_mandir}/man1/libtool.1*
%{_mandir}/man1/libtoolize.1*
%changelog
* Fri Apr 04 2025 Funda Wang <fundawang@yeah.net> - 2.5.4-3
- fix building packages without libltdl.la
* Tue Mar 11 2025 mahailiang <mahailiang@uniontech.com> - 2.5.4-2
- add sw_64 support
* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 2.5.4-1
- update to 2.5.4
* Tue Oct 08 2024 Funda Wang <fundawang@yeah.net> - 2.5.3-1
- update to 2.5.3
* Thu Sep 26 2024 Funda Wang <fundawang@yeah.net> - 2.4.7-4
- pass -Wl,xxx options before libraries
- disable LTO for link-order2 test
* Tue Jun 06 2023 laokz <zhangkai@iscas.ac.cn> - 2.4.7-3
- add -fPIC to fortran flags for riscv
*Thu Feb 02 2023 renhongxun <renhongxun@h-partners.com> - 2.4.7-2
- backport: tests/link-order.at: avoid warning and test failure with GNU grep 3.8
* Thu Nov 03 2022 renhongxun <renhongxun@h-partners.com> - 2.4.7-1
- upgrade version to 2.4.7
* Tue Apr 26 2022 renhongxun <renhongxun@h-partners.com> - 2.4.6-35
- udpate license from GFDL to GFDL-1.3-or-later
* Fri Jul 23 2021 yuanxin <yuanxin24@huawei.com> - 2.4.6-34
- remove BuildRequires gdb
* Thu Aug 20 2020 tianwei <tianwei12@huawei.com> - 2.4.6-33
- fixbug testcase fail for gfortan
* Thu Mar 19 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.4.6-32
- add necessary BuildRequires
* Mon Jan 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.4.6-31
- fixbug in wrong dependency of kernel-devel
+4
View File
@@ -0,0 +1,4 @@
version_control: git
src_repo: https://git.savannah.gnu.org/git/libtool.git
tag_prefix: ^v
separator: .