From beca7308a49f6ca4f3550fa8387a57297ca1e1fd58974df8e91dff9a8b1e4fc9 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 5 May 2021 18:48:10 +0000 Subject: [PATCH] - bsc#1185662: Move tcl.macros /usr/lib/rpm/macros.d . - https://core.tcl-lang.org/thread/tktview?name=98ae20f0f5: Add tcl-aa4a13c15516da45.patch to disable lto for the stubs libraries. OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=131 --- tcl-aa4a13c15516da45.patch | 26 ++++++++++++++++++++++++++ tcl.changes | 8 ++++++++ tcl.spec | 6 ++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 tcl-aa4a13c15516da45.patch diff --git a/tcl-aa4a13c15516da45.patch b/tcl-aa4a13c15516da45.patch new file mode 100644 index 0000000..a440310 --- /dev/null +++ b/tcl-aa4a13c15516da45.patch @@ -0,0 +1,26 @@ +Index: unix/Makefile.in +================================================================== +--- unix/Makefile.in ++++ unix/Makefile.in +@@ -1783,17 +1783,17 @@ + # Stub library binaries, these must be compiled for use in a shared library + # even though they will be placed in a static archive + #-------------------------------------------------------------------------- + + tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c +- $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD $(GENERIC_DIR)/tclStubLib.c ++ $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD -fno-lto $(GENERIC_DIR)/tclStubLib.c + + tclTomMathStubLib.o: $(GENERIC_DIR)/tclTomMathStubLib.c +- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclTomMathStubLib.c ++ $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD -fno-lto $(GENERIC_DIR)/tclTomMathStubLib.c + + tclOOStubLib.o: $(GENERIC_DIR)/tclOOStubLib.c +- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclOOStubLib.c ++ $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD -fno-lto $(GENERIC_DIR)/tclOOStubLib.c + + .c.o: + $(CC) -c $(CC_SWITCHES) $< + + #-------------------------------------------------------------------------- + diff --git a/tcl.changes b/tcl.changes index 4dee8e1..e284b78 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed May 5 18:32:38 UTC 2021 - Reinhard Max + +- bsc#1185662: Move tcl.macros /usr/lib/rpm/macros.d . +- https://core.tcl-lang.org/thread/tktview?name=98ae20f0f5: + Add tcl-aa4a13c15516da45.patch to disable lto for the stubs + libraries. + ------------------------------------------------------------------- Thu Jan 14 10:21:47 UTC 2021 - Reinhard Max diff --git a/tcl.spec b/tcl.spec index 00b677c..8a950b7 100644 --- a/tcl.spec +++ b/tcl.spec @@ -41,6 +41,7 @@ Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}%{rrc}-s Source1: tcl-rpmlintrc Source2: baselibs.conf Source3: macros.tcl +Patch0: tcl-aa4a13c15516da45.patch BuildRequires: autoconf BuildRequires: pkg-config BuildRequires: zlib-devel @@ -80,6 +81,7 @@ the Tcl language itself. %prep %setup -q -n %name%version +%patch0 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects @@ -151,7 +153,7 @@ rm -f %buildroot%scriptdir/tcl%TCL_MINOR/ldAix ln -sf tclsh%TCL_MINOR %buildroot%_prefix/bin/tclsh ln -sf tclsh.1.gz %buildroot%_mandir/man1/tclsh%TCL_MINOR.1.gz mkdir -p %buildroot%_datadir/tcl -install -D %{S:3} -m 644 %buildroot/etc/rpm/macros.tcl +install -D %{S:3} -m 644 %buildroot%_rpmmacrodir/macros.tcl %if "%_lib" == "lib64" %post @@ -172,7 +174,7 @@ exit 0 %exclude %scriptdir/*/*.a %exclude %scriptdir/*/*Config.sh %exclude %scriptdir/*/tclAppInit.c -%config /etc/rpm/macros.tcl +%_rpmmacrodir/macros.tcl %files devel %defattr(-,root,root)