Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- 1) I tried to build the toolchain downloading http://www.niosftp.com/pub/uclinux/nios2-linux-20090730.tar but gives the following error:
inlined from ‘col-
lect execute’ at /home/thor/Scrivania/progettoEmbedded/nios2-730/toolchain-build/..
/gcc3/gcc/collect2.c:1537: /usr/include/bits/fcntl2.h:51: error: call to
‘ open missing mode’ declared with attribute error: open with O CREAT in second
argument needs 3 arguments
--- Quote End --- I don't remember if this is for this error, but I have this fix to build on Ubuntu: gcc3$ git diff
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 30815af..840f75b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -710,7 +710,7 @@ ALL_CFLAGS = $(X_CFLAGS) $(T_CFLAGS)
$(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) $(XCFLAGS) @DEFS@
# Likewise.
-ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
+ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) -D_FORTIFY_SOURCE=0
# Build and host support libraries. FORBUILD is either
# .. or ../$(build_alias) depending on whether host != build.