diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-17 21:57:29 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-17 21:57:29 +0200 |
commit | f023bbb2abc825b662c687a9ad610600cbd55c77 (patch) | |
tree | c8a32476c03e6b522bccf84aebb0d954dad58eba /src/grt | |
parent | c429d3e572d8ef2b8d9f7a24bd1a16f8ab8c42a6 (diff) | |
download | ghdl-f023bbb2abc825b662c687a9ad610600cbd55c77.tar.gz ghdl-f023bbb2abc825b662c687a9ad610600cbd55c77.tar.bz2 ghdl-f023bbb2abc825b662c687a9ad610600cbd55c77.zip |
Avoid MSYS2 path translation.
Fix #365
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/Makefile.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/grt/Makefile.inc b/src/grt/Makefile.inc index 8e6a19648..feca70475 100644 --- a/src/grt/Makefile.inc +++ b/src/grt/Makefile.inc @@ -88,6 +88,13 @@ ifneq ($(LIBBACKTRACE),) GRT_LIBBACKTRACE=libbacktrace.a endif +# MSYS2 tries to be clever with paths in command line: it replaces msys2 paths +# by Windows paths. So for example, /bin/ls becomes c:/mingw64/bin/ls +# However, this is not always obvious to detect paths. In our case, msys2 +# transformed -aIc:/dir to -aIc:c:/dir, which was not understood by gnatmake. +# So tell MSYS2 not try transform paths that follow -aI or -gnatec +MSYS2_ARG=MSYS2_ARG_CONV_EXCL="-aI;-gnatec" + # Configuration pragmas. # -gnatdY is required to force the use of __gnat_last_chance_handler. GRT_PRAGMA_FLAG=-gnatec$(GRTSRCDIR)/grt.adc -gnat05 -gnatdY @@ -104,8 +111,8 @@ $(libdirsuffix)/libgrt.a: $(GRT_ADD_OBJS) grt/run-bind.o grt/main.o grt/grt-file $(GRT_RANLIB) $@ grt/run-bind.adb: grt $(GRT_SRC_DEPS) grt-force - cd grt; $(GNATMAKE) -c -aI$(GRTSRCDIR) -aI.. $(GRT_PRAGMA_FLAG) \ - ghdl_main $(GRT_ADAFLAGS) -cargs $(GRT_FLAGS) + cd grt; $(MSYS2_ARG) $(GNATMAKE) -c -aI$(GRTSRCDIR) -aI.. \ + $(GRT_PRAGMA_FLAG) ghdl_main $(GRT_ADAFLAGS) -cargs $(GRT_FLAGS) # Set No Run-Time flag to suppress references to standard gnat library. sed -e '/^P /s/P /P NR /' < grt/ghdl_main.ali > grt/ghdl_main-tmp.ali $(MV) grt/ghdl_main-tmp.ali grt/ghdl_main.ali @@ -115,10 +122,10 @@ grt: mkdir grt grt/run-bind.o: grt/run-bind.adb - cd grt; $(GRT_ADACOMPILE) -o run-bind.o run-bind.adb + cd grt; $(MSYS2_ARG) $(GRT_ADACOMPILE) -o run-bind.o run-bind.adb grt/main.o: $(GRTSRCDIR)/main.adb - cd grt; $(GRT_ADACOMPILE) -o main.o $< -Igrt + cd grt; $(MSYS2_ARG) $(GRT_ADACOMPILE) -o main.o $< -Igrt GRT_C_COMPILE = $(CC) -c $(GRT_FLAGS) -o $@ $< GRT_C_COMPILE_PIC = $(CC) -c $(GRT_FLAGS) $(PIC_FLAGS) -o $@ $< |