File: adjust-compile-flags

package info (click to toggle)
ghdl 2.0.0%2Bdfsg-6.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 72,852 kB
  • sloc: ada: 238,924; vhdl: 196,551; ansic: 24,457; python: 17,483; sh: 11,399; cpp: 2,283; makefile: 1,440; pascal: 516; exp: 40; asm: 25
file content (45 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Description: Apply compile flags as required by Debian
 Upstream has independently changed things so that this patch does not need to
 be upstreamed.
Author: Andreas Bombe <aeb@debian.org>
Forwarded: not-needed
Last-Update: 2022-11-25
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile.in
+++ b/Makefile.in
@@ -112,13 +112,14 @@
 #target=x86_64-apple-darwin
 #target=i386-pc-mingw32
 
+SHLIB_FLAGS=$(LDFLAGS)
 ifeq ($(SOEXT),.so)
-SHLIB_FLAGS=-Wl,-soname,$(notdir $@)
+SHLIB_FLAGS+=-Wl,-soname,$(notdir $@)
 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/$(notdir $@)
+SHLIB_FLAGS+=-Wl,-install_name,@rpath/$(notdir $@)
 endif
 
 # Flags for libraries
@@ -539,13 +540,13 @@
 ################ VPI #####################################################
 
 vpi_thunk.o: $(GRTSRCDIR)/vpi_thunk.c $(GRTSRCDIR)/vpi_thunk.h
-	$(CC) -c -o $@ $< $(PIC_FLAGS) $(CFLAGS)
+	$(CC) -c -g -o $@ $< $(PIC_FLAGS) $(CFLAGS)
 
 vhpi_thunk.o: $(GRTSRCDIR)/vhpi_thunk.c $(GRTSRCDIR)/vhpi_thunk.h
-	$(CC) -c -o $@ $< $(PIC_FLAGS) $(CFLAGS)
+	$(CC) -c -g -o $@ $< $(PIC_FLAGS) $(CFLAGS)
 
 lib/libghdlvpi$(SOEXT): vpi_thunk.o vhpi_thunk.o
-	$(CC) $(SHLIB_FLAGS) $(LDFLAGS) -shared -o $@ $^
+	$(CC) -g $(SHLIB_FLAGS) $(LDFLAGS) -shared -o $@ $^
 
 all.vpi: lib/libghdlvpi$(SOEXT)