Package Details: gcc48 4.8.5-1

Git Clone URL: https://aur.archlinux.org/gcc48.git (read-only, click to copy)
Package Base: gcc48
Description: The GNU Compiler Collection - C and C++ frontends (4.8.x)
Upstream URL: http://gcc.gnu.org
Licenses: GPL, custom, LGPL, FDL
Submitter: ftschindler
Maintainer: severach
Last Packager: severach
Votes: 12
Popularity: 0.049100
First Submitted: 2014-05-06 16:14 (UTC)
Last Updated: 2021-09-28 18:52 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

moormaster commented on 2021-09-01 00:21 (UTC) (edited on 2021-09-03 18:16 (UTC) by moormaster)

I also needed to make following changes in the last patch by chn - set CPPFLAGS when it was unset before entering strict mode (makepkg.conf does not set it anymore) - remove compiler flags -fstack-clash-protection and -fcf-protection

See my new patch

--- a/PKGBUILD  2021-09-03 20:15:32.986534503 +0200
+++ b/PKGBUILD  2021-09-03 20:15:30.979991752 +0200
@@ -97,6 +97,11 @@
 }

 build() {
+  if [ "$CPPFLAGS" == "" ]
+  then
+    CPPFLAGS=""
+  fi
+
   set -u
   if [ ! -s "${_basedir}/gcc-build/Makefile" ]; then
     cd "${_basedir}"
@@ -108,6 +113,9 @@
     CFLAGS="${CFLAGS//-fstack-protector-strong/-fstack-protector}"
     CXXFLAGS="${CXXFLAGS//-fstack-protector-strong/-fstack-protector}"

+    CFLAGS="${CFLAGS//-Werror=format-security/}"
+    CXXFLAGS="${CXXFLAGS//-Werror=format-security/}"
+
     # using -pipe causes spurious test-suite failures
     # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
     CFLAGS="${CFLAGS/-pipe/}"
@@ -120,6 +128,14 @@
     CFLAGS="${CFLAGS/-Wformat-overflow=[0-9]/}"
     CXXFLAGS="${CXXFLAGS/-Wformat-overflow=[0-9]/}"

+    CFLAGS="${CFLAGS//-fstack-clash-protection/}"
+    CXXFLAGS="${CXXFLAGS//-fstack-clash-protection/}"
+
+    CFLAGS="${CFLAGS//-fcf-protection/}"
+    CXXFLAGS="${CXXFLAGS//-fcf-protection/}"
+
+    CPPFLAGS+=" -O2 -Wno-implicit-fallthrough -Wno-expansion-to-defined -Wno-unused-result -Wno-cast-function-type -Wno-switch"
+
     cd 'gcc-build'
     # The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
     ../configure \
@@ -151,7 +167,8 @@
       --with-plugin-ld='ld.gold' \
       --with-ppl \
       --with-system-zlib \
-      --prefix='/usr'
+      --prefix='/usr' \
+      CXX='g++ -std=c++14'
 #      CXX='g++-4.9' CC='gcc-4.9'
   fi

chn commented on 2021-06-19 11:53 (UTC)

Build failed with gcc11, unless with the following patch:

diff --git a/PKGBUILD b/PKGBUILD
index 7b1433f..21927aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -120,6 +120,8 @@ build() {
     CFLAGS="${CFLAGS/-Wformat-overflow=[0-9]/}"
     CXXFLAGS="${CXXFLAGS/-Wformat-overflow=[0-9]/}"

+    CPPFLAGS+=" -O2 -Wno-implicit-fallthrough -Wno-expansion-to-defined -Wno-unused-result -Wno-cast-function-type -Wno-switch"
+
     cd 'gcc-build'
     # The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
     ../configure \
@@ -151,7 +153,8 @@ build() {
       --with-plugin-ld='ld.gold' \
       --with-ppl \
       --with-system-zlib \
-      --prefix='/usr'
+      --prefix='/usr' \
+      CXX='g++ -std=c++14'
 #      CXX='g++-4.9' CC='gcc-4.9'
   fi

severach commented on 2016-12-12 18:42 (UTC)

Builds fine here with gcc-multilib 6.2.1. Try enabling the LD_PRELOAD lines.

quenyen commented on 2016-12-12 15:37 (UTC)

I get a fail on building this from Manjaro Linux (current...either from gcc62 or from gcc49....this is where it goes belly up for me.... make[6]: *** [libstdc++.la] Error 139 make[5]: *** [all-recursive] Error 1 make[4]: *** [all-recursive] Error 1 make[3]: *** [all] Error 2 make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 /usr/bin/makepkg: line 729: logpipe: unbound variable ==> ERROR: Makepkg was unable to build gcc48. ==> Restart building gcc48 ? [y/N] ==> ------------------------------ ==> N I have the same problem of course just compiling the source....

severach commented on 2016-10-10 03:12 (UTC)

Updated PKGBUILD didn't work for me. Failed on gcc.texi just as mine did. Using the 4.9 PKGBUILD would cause a lot of changes that might break things for users wanting 4.8.

mrueg commented on 2016-10-09 20:55 (UTC)

I got it to work with a fairly straightforward adaptation of the gcc49 PKGBUILD: https://www.dropbox.com/s/x9f5b1vdqvidtf1/gcc48.tar.gz?dl=0

ftschindler commented on 2016-06-02 13:52 (UTC)

I just dropped ownership of this package, since I require it no longer. Feel free to step up and to submit a working PKGBUILD!

jpkotta commented on 2016-06-01 17:18 (UTC)

Working PKGBUILD: http://pastebin.com/gxWZW2s1 It removes the __gnu_inline__ declaration; I don't know if that's the best fix. I also had to export LD_PRELOAD because other commands besides configure needed it. Finally, my CHOST apparently doesn't match the directory for the docs. IIRC, this was changed in /etc/makepkg.conf not too long ago.

netskink commented on 2016-05-31 13:41 (UTC) (edited on 2016-05-31 13:42 (UTC) by netskink)

I'm trying to build using makepkg -sri. Here is the last part of the log. g++ -c -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Icp -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/cp -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/../include -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/../libcpp/include -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/../libdecnumber -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/../libdecnumber/bid -I../libdecnumber -I/home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/../libbacktrace /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/cp/except.c -o cp/except.o In file included from ./tm.h:28:0, from /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/cp/except.c:27: /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\ ^ /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ ^ In file included from ./tm.h:42:0, from /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/cp/except.c:27: /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \ ^ In file included from /home/davis/aur/bin/gcc48/src/gcc-4.8.5/gcc/cp/except.c:1008:0: cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’: cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here cfns.gperf: At global scope: cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined Makefile:1059: recipe for target 'cp/except.o' failed make[3]: *** [cp/except.o] Error 1 make[3]: Leaving directory '/home/davis/aur/bin/gcc48/src/gcc-build/gcc' Makefile:4156: recipe for target 'all-stage1-gcc' failed make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory '/home/davis/aur/bin/gcc48/src/gcc-build' Makefile:19114: recipe for target 'stage1-bubble' failed make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory '/home/davis/aur/bin/gcc48/src/gcc-build' Makefile:885: recipe for target 'all' failed make: *** [all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...