#1 Remove package note flags from headers (#2051341)
Merged 2 years ago by thofmann. Opened 2 years ago by jjames.
Unknown source rawhide  into  rawhide

@@ -0,0 +1,63 @@

+ diff -rup gprolog-1.5.0.orig/src/Ma2Asm/Makefile.in gprolog-1.5.0/src/Ma2Asm/Makefile.in

+ --- gprolog-1.5.0.orig/src/Ma2Asm/Makefile.in	2021-07-07 04:13:02.000000000 -0600

+ +++ gprolog-1.5.0/src/Ma2Asm/Makefile.in	2022-02-10 09:51:23.948385978 -0700

+ @@ -1,6 +1,7 @@

+  GPLC   = @GPLC@

+  CC     = @CC@ @CFLAGS_MACHINE@

+  CFLAGS = @CFLAGS@

+ +LDFLAGS = @LDFLAGS@

+  LDLIBS = @LDLIBS@

+  

+  # set by mappers.sh

+ @@ -25,7 +26,7 @@ ma2asm_inst@OBJ_SUFFIX@: ma2asm_inst.c m

+  

+  ma2asm@EXE_SUFFIX@: ma2asm@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@ \

+                      ma2asm_inst@OBJ_SUFFIX@ ma2asm_inst.c

+ -	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@

+ +	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@

+  

+  

+  clean:

+ diff -rup gprolog-1.5.0.orig/src/TopComp/Makefile.in gprolog-1.5.0/src/TopComp/Makefile.in

+ --- gprolog-1.5.0.orig/src/TopComp/Makefile.in	2021-07-07 04:13:02.000000000 -0600

+ +++ gprolog-1.5.0/src/TopComp/Makefile.in	2022-02-10 09:50:10.996357823 -0700

+ @@ -5,6 +5,7 @@ CFLAGS          = @CFLAGS@

+  HEXGPLC         = @HEXGPLC@

+  CC              = @CC@ @CFLAGS_MACHINE@

+  CFLAGS          = @CFLAGS@

+ +LDFLAGS         = @LDFLAGS@

+  LDLIBS          = @LDLIBS@

+  TOP_LEVEL_LIBS  = @TOP_LEVEL_LIBS@

+  

+ @@ -24,10 +25,10 @@ first: $(EXECS)

+  

+  $(GPLC)@EXE_SUFFIX@: top_comp.c copying.c ../EnginePl/wam_regs.h \

+           ../EnginePl/gp_config.h ../EnginePl/machine1.c decode_hexa.c copying.c prolog_path.c

+ -	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)

+ +	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)

+  

+  $(HEXGPLC)@EXE_SUFFIX@: hexfilter.c decode_hexa.c

+ -	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c

+ +	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c

+  

+  

+  

+ diff -rup gprolog-1.5.0.orig/src/Wam2Ma/Makefile.in gprolog-1.5.0/src/Wam2Ma/Makefile.in

+ --- gprolog-1.5.0.orig/src/Wam2Ma/Makefile.in	2021-05-03 07:55:34.000000000 -0600

+ +++ gprolog-1.5.0/src/Wam2Ma/Makefile.in	2022-02-10 09:52:00.700400168 -0700

+ @@ -1,5 +1,6 @@

+  CC     = @CC@ @CFLAGS_MACHINE@

+  CFLAGS = @CFLAGS@

+ +LDFLAGS = @LDFLAGS@

+  

+  

+  all: wam2ma@EXE_SUFFIX@

+ @@ -12,7 +13,7 @@ wam2ma@OBJ_SUFFIX@: wam2ma.c wam_parser.

+  	$(CC) $(CFLAGS) -c wam2ma.c

+  

+  wam2ma@EXE_SUFFIX@: wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@

+ -	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@

+ +	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@

+  

+  

+  clean:

file modified
+29 -16
@@ -1,18 +1,20 @@

- Name:     gprolog

+ Name:		gprolog

  Version:	1.5.0

  Release:	%autorelease

- Summary: 	GNU Prolog is a free Prolog compiler

+ Summary:	GNU Prolog is a free Prolog compiler

  

- License:	GPLv2+

- URL: 		http://www.gprolog.org

- Source: 	http://www.gprolog.org/gprolog-%{version}.tar.gz

- Patch0:   gprolog.make-print-submake-output.patch

+ License:	LGPLv3+ or GPLv2+

+ URL:		http://www.gprolog.org

+ Source:		http://www.gprolog.org/gprolog-%{version}.tar.gz

+ Patch0:		gprolog.make-print-submake-output.patch

+ # Link binaries with Fedora ldflags

+ Patch1:		gprolog.link-with-fedora-flags.patch

  

- BuildRequires:  gcc-c++

- BuildRequires:  gdb-headless

- BuildRequires: make

+ BuildRequires:	gcc-c++

+ BuildRequires:	gdb-headless

+ BuildRequires:	make

  

- ExclusiveArch:	x86_64 %{ix86} ppc alpha

+ ExclusiveArch:	x86_64 %{ix86} ppc alpha aarch64

  

  Obsoletes:	gprolog-examples < 1.4.0

  Provides:	gprolog-examples = %{version}-%{release}
@@ -43,10 +45,15 @@

  %prep

  %autosetup -p1

  

+ # For build reproducibility reasons, we do not want to insert today's date

+ # into header files, but rather the date of the gprolog release.

+ verdate=$(date +"%b %d %Y" -r VERSION)

+ veryear=$(date +%Y -r VERSION)

+ sed -i s/'`pl_date`'/"\"$verdate\""/';'s/'`pl_year`'/"$veryear"/ src/configure

+ 

  %build

- # This package fails to build with LTO due to undefined symbols.  LTO

- # was disabled in OpenSuSE as well, but with no real explanation why

- # beyond the undefined symbols.  It really shold be investigated further.

+ # This package fails to build with LTO due to use of global register variables.

+ # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68384 for an explanation.

  # Disable LTO

  %define _lto_cflags %{nil}

  
@@ -57,12 +64,18 @@

  

  # See http://lists.gnu.org/archive/html/bug-prolog/2016-08/msg00006.html

  # for the discussion on adding '--disable-regs'

- ./configure \

+ %configure \

        --with-install-dir=$RPM_BUILD_ROOT%{_libdir}/gprolog-%{version} \

        --without-links-dir --without-examples-dir \

        --with-doc-dir=dist-doc \

        --with-c-flags="$RPM_OPT_FLAGS" \

+ %ifarch %{ix86}

        --disable-regs

+ %endif

+ 

+ # Remove package notes flag from LDFLAGS

+ # See https://bugzilla.redhat.com/show_bug.cgi?id=2051341

+ sed -i 's/ -Wl,-dT.*\.ld//' EnginePl/gp_config.h

  

  # _smp_flags seems to make trouble

  make
@@ -81,14 +94,14 @@

      mkdir $RPM_BUILD_ROOT%{_bindir}

      cd $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/bin

      for i in *; do

-  	ln -s ../%{_lib}/gprolog-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i

+ 	ln -s ../%{_lib}/gprolog-%{version}/bin/$i $RPM_BUILD_ROOT%{_bindir}/$i

      done

  )

  rm -f dist-doc/*.{chm,dvi,ps}

  rm -f dist-doc/compil-scheme.pdf

  rm -f dist-doc/debug-box.pdf

  

- for file in ChangeLog COPYING NEWS VERSION

+ for file in ChangeLog COPYING NEWS README VERSION

  do

      rm -f $RPM_BUILD_ROOT%{_libdir}/gprolog-%{version}/$file

  done

  • Change license from GPLv2+ to LGPLv3+ or GPLv2+
  • Add patch to link binaries with Fedora LDFLAGS
  • Add aarch64 to list of supported architectures
  • Allow use of registers unless building for 32-bit x86
  • Improve build reproducibility
  • Fix rpmlint warnings about mixed spaces and tabs

I also included a comment about why building with LTO doesn't work. It's an unresolved GCC issue. Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82643354.

Looks good, thank you!

Pull-Request has been merged by thofmann

2 years ago

@thofmann thanks for merging. Would you mind also doing an F36 build? The same problem is occurring on that branch.

@thofmann To close ppl FTBFS on F-36, now I am going to merge this change (on gprolog) also on F-36.