Skip to content

Commit

Permalink
Merge pull request #310 from riscv/relsrcdir-fix
Browse files Browse the repository at this point in the history
Fix relsrcdir problem that breaks regression Makefile.
  • Loading branch information
Jim Wilson authored Dec 26, 2017
2 parents 691e4e8 + 3211aa1 commit e2b809a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
srcdir := @abs_top_srcdir@
relsrcdir := @top_srcdir@
builddir := @abs_top_builddir@
INSTALL_DIR := @prefix@

# We need a relative source dir for the gcc configure, to make msys2 mingw64
# builds work. Mayberelsrcdir is relative if a relative path was used to run
# configure, otherwise absolute, so we have to check.
mayberelsrcdir := @top_srcdir@
gccsrcdir := $(shell case $(mayberelsrcdir) in \
([\\/]* | ?:[\\/]*) echo $(mayberelsrcdir)/riscv-gcc ;; \
(*) echo ../$(mayberelsrcdir)/riscv-gcc ;; \
esac)

PACKAGES :=

DISTDIR ?= /var/cache/distfiles
Expand Down Expand Up @@ -230,7 +238,7 @@ stamps/build-gcc-linux-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-linux \
--disable-libgomp \
--disable-nls \
--disable-bootstrap \
--src=../$(relsrcdir)/riscv-gcc \
--src=$(gccsrcdir) \
$(GCC_CHECKING_FLAGS) \
$(MULTILIB_FLAGS) \
$(WITH_ABI) \
Expand Down Expand Up @@ -259,7 +267,7 @@ stamps/build-gcc-linux-stage2: $(srcdir)/riscv-gcc $(addprefix stamps/build-glib
--disable-libquadmath \
--disable-nls \
--disable-bootstrap \
--src=../$(relsrcdir)/riscv-gcc \
--src=$(gccsrcdir) \
$(GCC_CHECKING_FLAGS) \
$(MULTILIB_FLAGS) \
$(WITH_ABI) \
Expand Down Expand Up @@ -348,7 +356,7 @@ stamps/build-gcc-newlib-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-newlib
--disable-libquadmath \
--disable-libgomp \
--disable-nls \
--src=../$(relsrcdir)/riscv-gcc \
--src=$(gccsrcdir) \
$(GCC_CHECKING_FLAGS) \
$(MULTILIB_FLAGS) \
$(WITH_ABI) \
Expand Down Expand Up @@ -437,7 +445,7 @@ stamps/build-gcc-newlib-stage2: $(srcdir)/riscv-gcc stamps/build-newlib \
--disable-libquadmath \
--disable-libgomp \
--disable-nls \
--src=../$(relsrcdir)/riscv-gcc \
--src=$(gccsrcdir) \
$(GCC_CHECKING_FLAGS) \
$(MULTILIB_FLAGS) \
$(WITH_ABI) \
Expand Down

0 comments on commit e2b809a

Please sign in to comment.