From 55a5513c14afb209b06ea86bbb918f6e13f1e50c Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sun, 9 May 2021 14:32:48 +0200 Subject: ortho: use LDFLAGS and prefer them over defaults --- src/ortho/debug/Makefile | 3 +-- src/ortho/gcc/Makefile | 2 +- src/ortho/llvm-nodebug/Makefile | 2 +- src/ortho/llvm35/Makefile | 2 +- src/ortho/llvm4-nodebug/Makefile | 2 +- src/ortho/llvm6/Makefile | 2 +- src/ortho/mcode/Makefile | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/ortho') 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) $@ -- cgit v1.2.3