Skip to content

Commit

Permalink
Fix relsrcdir problem that breaks regression Makefile.
Browse files Browse the repository at this point in the history
Rename to mayberelsrcdir, and handle both cases where it can be relative
or absolute when setting gccsrcdir.
  • Loading branch information
Jim Wilson committed Dec 23, 2017
1 parent 691e4e8 commit 3211aa1
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 3211aa1

Please sign in to comment.