aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-29 03:45:21 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-29 03:53:02 +0100
commitb953465d8d34a5e788a72c5676aec47a62da9f35 (patch)
treec45a6f5587898ff4d3f9639da0483deac7a38234 /reproduce/software/make
parentc778a69df31901be9a7726c51a7ab784aa3414d8 (diff)
Reactivated --host-cc config option to use host C compiler
Until now, if GCC couldn't be built for any reason, Maneage would crash and the user had no way forward. Since GCC is complicated, it may happen and is frustrating to wait until the bug is fixed. Also, while debugging Maneage, when we know GCC has no problem, because it takes so long, it discourages testing. With this commit, we have re-activated the `--host-cc' option. It was already defined in the options of `./project', but its affect was nullified by hard-coding it to zero in the configure script on GNU/Linux systems. So with this commit that has been removed and the user can use their own C compiler on a GNU/Linux operating system also. Furthermore, to inform the user about this option and its usefulness, when GCC fails to build, a clear warning message is printed, instructing the user to post the problem as a bug and telling them how to continue building the project with the `--host-cc' option.
Diffstat (limited to 'reproduce/software/make')
-rw-r--r--reproduce/software/make/basic.mk27
1 files changed, 23 insertions, 4 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 79411d2..779320f 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -1297,8 +1297,8 @@ $(ibidir)/gcc: | $(ibidir)/binutils \
tar xf $(word 1,$(filter $(tdir)/%,$|)); \
if [ $$odir != $(ddir) ]; then \
ln -s $$odir/gcc-$(gcc-version) $(ddir)/gcc-$(gcc-version); \
- fi \
- && cd gcc-$(gcc-version) \
+ fi; \
+ if cd gcc-$(gcc-version) \
&& mkdir build \
&& cd build \
&& ../configure SHELL=$(ibdir)/bash \
@@ -1347,6 +1347,25 @@ $(ibidir)/gcc: | $(ibidir)/binutils \
rm -rf $$odir; \
rm $(ddir)/gcc-$(gcc-version); \
fi \
- && ln -sf $(ibdir)/gcc $(ibdir)/cc \
- && echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
+ && ln -sf $(ibdir)/gcc $(ibdir)/cc; \
+ then \
+ echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@; \
+ else echo; echo; echo; \
+ echo "_________________________________________________"; \
+ echo "!!!!!!!! Warning from Maneage !!!!!!!!"; \
+ echo; \
+ echo "Unfortunately building of GCC failed on this system!"; \
+ echo "Can you please copy the last ~500 lines above and post it"; \
+ echo "as a bug here (as an attached file):"; \
+ echo " https://sv.nongnu.org/support/?func=additem&group=reproduce"; \
+ echo; \
+ echo "In the meantime, please re-configure Maneage with '--host-cc'"; \
+ echo "like below so it uses your own C compiler for building the"; \
+ echo "high-level software ('-e' is to use the existing configuration):"; \
+ echo; \
+ echo " ./project configure -e --host-cc"; \
+ echo; \
+ echo "__________ SEE NOTE FROM MANEAGE ABOVE __________"; \
+ echo; exit 1; \
+ fi; \
fi