[BACK]Return to patch-aa CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / editors / pico / patches

File: [cvs.NetBSD.org] / pkgsrc / editors / pico / patches / patch-aa (download)

Revision 1.18, Thu Nov 30 15:16:25 2017 UTC (4 years ago) by wiz
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, HEAD
Changes since 1.17: +8 -8 lines

pico: pass LDFLAGS to linker.

Fixes RELRO build.

$NetBSD: patch-aa,v 1.18 2017/11/30 15:16:25 wiz Exp $

--- pico/makefile.neb.orig	2001-10-23 22:18:36.000000000 +0000
+++ pico/makefile.neb
@@ -32,16 +32,12 @@ LN=          ln -s
 MAKE=        make
 OPTIMIZE=    # -O
 PROFILE=     # -pg
-DEBUG=       -g -DDEBUG
+DEBUG=       # -g -DDEBUG
 
 STDCFLAGS=	-Dneb -DJOB_CONTROL -DPOSIX -DMOUSE
 CFLAGS=         $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
 
 # switches for library building
-LIBCMD=		ar
-LIBARGS=	ru
-RANLIB=		ranlib
-
 LIBS=		$(EXTRALDFLAGS) -ltermcap
 
 OFILES=		attach.o basic.o bind.o browse.o buffer.o \
@@ -55,17 +51,17 @@ HFILES=		headers.h estruct.h edef.h efun
 # dependencies for the Unix versions of pico and libpico.a
 #
 all:		pico pilot
-pico pilot:	libpico.a
+pico pilot:	libpico.la
 
 pico:		main.o
-		$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
+		$(LDCC) $(LDFLAGS) $(CFLAGS) main.o libpico.la $(LIBS) -o pico
 
 pilot:		pilot.o
-		$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
+		$(LDCC) $(LDFLAGS) $(CFLAGS) pilot.o libpico.la $(LIBS) -o pilot
 
-libpico.a:	$(OFILES)
-		$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
-		$(RANLIB) libpico.a
+libpico.la:	$(OFILES)
+		$(LDCC) $(LDFLAGS) -o libpico.la $(OFILES:.o=.lo) -rpath $(PREFIX)/lib \
+			-version-info 6:0
 
 clean:
 		rm -f *.a *.o *~ pico_os.c os.h pico pilot