aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-11-18 19:13:57 +0100
committerTristan Gingold <tgingold@free.fr>2014-11-18 19:13:57 +0100
commitf30843a0844f083dfb8780e13839622d28ec2fb9 (patch)
treec7f3177ed49c307aeb718991390e263febc58451
parent0d57b5eca852274c47df8dbce01dd5ffb6344edb (diff)
downloadghdl-f30843a0844f083dfb8780e13839622d28ec2fb9.tar.gz
ghdl-f30843a0844f083dfb8780e13839622d28ec2fb9.tar.bz2
ghdl-f30843a0844f083dfb8780e13839622d28ec2fb9.zip
gcc/Make-lang.in: handle non-default libexecdir.
-rw-r--r--dist/gcc/Make-lang.in8
1 files changed, 5 insertions, 3 deletions
diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in
index fea35efb0..8b83c35d6 100644
--- a/dist/gcc/Make-lang.in
+++ b/dist/gcc/Make-lang.in
@@ -87,7 +87,7 @@ ghdl1$(exeext): force $(GHDL1_OBJS) $(BACKEND) $(LIBDEPS)
-largs --LINK=$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GHDL1_OBJS) \
$(filter-out main.o,$(BACKEND)) $(LIBS) $(BACKENDLIBS)
-vhdl/default_pathes.ads:
+vhdl/default_pathes.ads: Makefile
echo "-- DO NOT EDIT" > tmp-dpathes.ads
echo "-- This file is created by Makefile" >> tmp-dpathes.ads
echo "package Default_Pathes is" >> tmp-dpathes.ads
@@ -95,8 +95,10 @@ vhdl/default_pathes.ads:
echo " pragma Style_Checks (\"M999\");" >> tmp-dpathes.ads
echo " Install_Prefix : constant String :=" >> tmp-dpathes.ads
echo " \"$(exec_prefix)\";" >> tmp-dpathes.ads
- echo " Compiler_Gcc : constant String :=" >> tmp-dpathes.ads
- echo " \"libexec/gcc/$(target_noncanonical)/$(version)/ghdl1$(exeext)\";" >> tmp-dpathes.ads
+ suffix=`expr @"$(libexecdir)" : @"$(prefix)/\(.*\)"`; \
+ if test x"$$suffix" = x; then suffix="$(libexecdir)"; fi; \
+ echo " Compiler_Gcc : constant String :=" >> tmp-dpathes.ads; \
+ echo " \"$$suffix/gcc/$(target_noncanonical)/$(version)/ghdl1$(exeext)\";" >> tmp-dpathes.ads
echo " Compiler_Debug : constant String := \"\";" >> tmp-dpathes.ads
echo " Compiler_Mcode : constant String := \"\";" >> tmp-dpathes.ads
echo " Compiler_Llvm : constant String := \"\";" >> tmp-dpathes.ads