Description: Apply compile flags as required by Debian
Author: Andreas Bombe <aeb@debian.org>
Last-Update: 2018-08-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: git/Makefile.in
===================================================================
--- git.orig/Makefile.in	2021-01-29 02:14:46.687992971 +0100
+++ git/Makefile.in	2021-01-29 02:14:46.683992961 +0100
@@ -104,13 +104,14 @@
 #target=x86_64-apple-darwin
 #target=i386-pc-mingw32
 
+SHLIB_FLAGS=$(LDFLAGS)
 ifeq ($(SOEXT),.so)
-SHLIB_FLAGS=-Wl,-soname,$@
+SHLIB_FLAGS+=-Wl,-soname,$@
 else ifeq ($(SOEXT),.dll)
-SHLIB_FLAGS=
+SHLIB_FLAGS+=
 else ifeq ($(SOEXT),.dylib)
 # Allow the use of -rpath in executable
-SHLIB_FLAGS=-Wl,-install_name,@rpath/$@
+SHLIB_FLAGS+=-Wl,-install_name,@rpath/$@
 endif
 
 # Flags for libraries
@@ -500,10 +501,10 @@
 
 vpi_thunk.o: $(GRTSRCDIR)/vpi_thunk.c $(GRTSRCDIR)/vpi_thunk.h
 #	Do not use OPT_FLAGS (do not enable coverage)
-	$(CC) -c -o $@ $< $(PIC_FLAGS) -O $(WARN_CFLAGS)
+	$(CC) -c -g -o $@ $< $(PIC_FLAGS) -O $(WARN_CFLAGS)
 
 libghdlvpi$(SOEXT): vpi_thunk.o
-	$(CC) -o $@ $< -shared $(SHLIB_FLAGS)
+	$(CC) -g -o $@ $< -shared $(SHLIB_FLAGS)
 
 all.vpi: libghdlvpi$(SOEXT)
 
Index: git/configure
===================================================================
--- git.orig/configure	2021-01-29 02:14:46.687992971 +0100
+++ git/configure	2021-01-29 02:14:46.683992961 +0100
@@ -31,7 +31,7 @@
 CFLAGS=${CFLAGS:--g}
 GNATMAKE=${GNATMAKE:-gnatmake}
 MAKE=${MAKE:-make}
-LDFLAGS=
+LDFLAGS=${LDFLAGS}
 prefix=/usr/local
 libdirsuffix=lib/ghdl
 incdirsuffix=include
