aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2021-05-09 14:32:48 +0200
committertgingold <tgingold@users.noreply.github.com>2021-05-10 07:56:17 +0200
commit55a5513c14afb209b06ea86bbb918f6e13f1e50c (patch)
tree71c24e3b551f8da6a6f44d08b5aef9d153de1532 /src/ortho
parentb21b4e7b34807156d6d3bc3f8e30a41bf324dfcb (diff)
downloadghdl-55a5513c14afb209b06ea86bbb918f6e13f1e50c.tar.gz
ghdl-55a5513c14afb209b06ea86bbb918f6e13f1e50c.tar.bz2
ghdl-55a5513c14afb209b06ea86bbb918f6e13f1e50c.zip
ortho: use LDFLAGS and prefer them over defaults
Diffstat (limited to 'src/ortho')
-rw-r--r--src/ortho/debug/Makefile3
-rw-r--r--src/ortho/gcc/Makefile2
-rw-r--r--src/ortho/llvm-nodebug/Makefile2
-rw-r--r--src/ortho/llvm35/Makefile2
-rw-r--r--src/ortho/llvm4-nodebug/Makefile2
-rw-r--r--src/ortho/llvm6/Makefile2
-rw-r--r--src/ortho/mcode/Makefile4
7 files changed, 8 insertions, 9 deletions
diff --git a/src/ortho/debug/Makefile b/src/ortho/debug/Makefile
index 885ff0d55..d7d297c1b 100644
--- a/src/ortho/debug/Makefile
+++ b/src/ortho/debug/Makefile
@@ -23,14 +23,13 @@ CC=gcc
CFLAGS=-g
ALL_GNAT_FLAGS=-pipe -g -gnato -gnatwaeu -gnatf -gnaty3befhkmr
GNATMAKE_FLAGS=$(ALL_GNAT_FLAGS) $(GNATFLAGS) -aI$(ortho_srcdir) -aI$(orthobe_srcdir) -aI.
-#LARGS=-largs -static
SED=sed
all: $(ortho_exec)
$(ortho_exec): force $(ortho_srcdir)/$(BE)/ortho_debug.ads
- $(GNATMAKE) -o $@ $(GNATMAKE_FLAGS) ortho_debug-main -bargs -E $(LARGS)
+ $(GNATMAKE) -o $@ $(GNATMAKE_FLAGS) ortho_debug-main -bargs -E -largs $(LDFLAGS)
clean:
$(RM) -f *.o *.ali *~ b~*.ad? ortho_nodes-main
diff --git a/src/ortho/gcc/Makefile b/src/ortho/gcc/Makefile
index 5b12ea569..498aa99d0 100644
--- a/src/ortho/gcc/Makefile
+++ b/src/ortho/gcc/Makefile
@@ -69,7 +69,7 @@ $(ortho_exec): $(AGCC_DEPS) $(orthobe_srcdir)/ortho_gcc.ads force
$(GNATMAKE) -o $@ -aI$(ortho_srcdir) \
-aI$(ortho_srcdir)/gcc $(GNATFLAGS) ortho_gcc-main \
-bargs -E -largs --LINK=$(LINKER) $(AGCC_OBJS) \
- $(BACKEND) $(LIBS) $(BACKENDLIBS)
+ $(LDFLAGS) $(BACKEND) $(LIBS) $(BACKENDLIBS)
agcc-clean: force
$(RM) -f $(agcc_objdir)/*.o
diff --git a/src/ortho/llvm-nodebug/Makefile b/src/ortho/llvm-nodebug/Makefile
index 50ddc1bc5..880735857 100644
--- a/src/ortho/llvm-nodebug/Makefile
+++ b/src/ortho/llvm-nodebug/Makefile
@@ -12,7 +12,7 @@ $(ortho_exec): $(ortho_srcdir)/llvm-nodebug/ortho_llvm.ads force llvm-cbindings.
$(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm-nodebug -aI$(ortho_srcdir) \
$(GNATFLAGS) ortho_code_main -bargs -E \
-largs llvm-cbindings.o --LINK=$(CXX) \
- $(LDFLAGS) `$(LLVM_CONFIG) --ldflags --libs --system-libs`
+ `$(LLVM_CONFIG) --ldflags --libs --system-libs` $(LDFLAGS)
llvm-cbindings.o: $(ortho_srcdir)/llvm-nodebug/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --cxxflags` -o $@ $<
diff --git a/src/ortho/llvm35/Makefile b/src/ortho/llvm35/Makefile
index 5abe441da..33aee4cf5 100644
--- a/src/ortho/llvm35/Makefile
+++ b/src/ortho/llvm35/Makefile
@@ -12,7 +12,7 @@ $(ortho_exec): $(ortho_srcdir)/llvm35/ortho_llvm.ads force llvm-cbindings.o
$(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm -aI$(ortho_srcdir) \
$(GNATFLAGS) ortho_code_main -bargs -E \
-largs llvm-cbindings.o --LINK=$(CXX) \
- $(LDFLAGS) `$(LLVM_CONFIG) --ldflags --libs --system-libs`
+ `$(LLVM_CONFIG) --ldflags --libs --system-libs` $(LDFLAGS)
llvm-cbindings.o: $(ortho_srcdir)/llvm35/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --cxxflags` -o $@ $<
diff --git a/src/ortho/llvm4-nodebug/Makefile b/src/ortho/llvm4-nodebug/Makefile
index f3be7dbde..b5fd22a8a 100644
--- a/src/ortho/llvm4-nodebug/Makefile
+++ b/src/ortho/llvm4-nodebug/Makefile
@@ -14,7 +14,7 @@ $(ortho_exec): $(ortho_srcdir)/llvm4-nodebug/ortho_llvm.ads force llvm-cbindings
$(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm4-nodebug -aI$(ortho_srcdir) \
$(GNATFLAGS) ortho_code_main -bargs -E \
-largs llvm-cbindings.o --LINK=$(CXX) \
- $(LDFLAGS) `$(LLVM_LDFLAGS)`
+ `$(LLVM_LDFLAGS)` $(LDFLAGS)
llvm-cbindings.o: $(ortho_srcdir)/llvm4-nodebug/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --cxxflags` -o $@ $<
diff --git a/src/ortho/llvm6/Makefile b/src/ortho/llvm6/Makefile
index 31f25c9fa..d35395544 100644
--- a/src/ortho/llvm6/Makefile
+++ b/src/ortho/llvm6/Makefile
@@ -14,7 +14,7 @@ $(ortho_exec): $(ortho_srcdir)/llvm6/ortho_llvm.ads force llvm-cbindings.o
$(GNATMAKE) -o $@ -aI$(ortho_srcdir)/llvm6 -aI$(ortho_srcdir) \
$(GNATFLAGS) ortho_code_main -bargs -E \
-largs llvm-cbindings.o --LINK=$(CXX) \
- $(LDFLAGS) `$(LLVM_LDFLAGS)`
+ `$(LLVM_LDFLAGS)` $(LDFLAGS)
llvm-cbindings.o: $(ortho_srcdir)/llvm6/llvm-cbindings.cpp
$(CXX) -c `$(LLVM_CONFIG) --cxxflags` $(CFLAGS) -o $@ $<
diff --git a/src/ortho/mcode/Makefile b/src/ortho/mcode/Makefile
index 791d1f307..25f3c664b 100644
--- a/src/ortho/mcode/Makefile
+++ b/src/ortho/mcode/Makefile
@@ -10,13 +10,13 @@ all: $(ortho_exec)
$(ortho_exec): $(ortho_srcdir)/mcode/ortho_mcode.ads memsegs_c.o force
$(GNATMAKE) -o $@ -g -aI$(ortho_srcdir)/mcode -aI$(ortho_srcdir) \
-aI$(ortho_srcdir)/.. $(GNATFLAGS) -gnatw.A ortho_code_main \
- -bargs -E -largs memsegs_c.o #-static
+ -bargs -E -largs $(LDFLAGS) memsegs_c.o #-static
memsegs_c.o: $(ortho_srcdir)/mcode/memsegs_c.c
$(CC) -c $(CFLAGS) -o $@ $<
oread: $(ortho_srcdir)/mcode/ortho_mcode.ads force
- $(GNATMAKE) -m -o $@ -g $(GNATFLAGS) -aI../oread ortho_code_main -aI.. -largs memsegs_c.o
+ $(GNATMAKE) -m -o $@ -g $(GNATFLAGS) -aI../oread ortho_code_main -aI.. -largs $(LDFLAGS) memsegs_c.o
elfdump: force
$(GNATMAKE) -m -g $(GNATFLAGS) $@