Failure to build GPC under Linux
John Ries <[email protected]> Sun, 10 May 2020 19:18:01 -0700
| Newsgroups | gmane.comp.compilers.gpc |
|---|---|
| Message-ID | <CAKqWTQKoD10yR_9HJn=O1pC5JgjjSE6NSPq9fsaBqQBD0HMKyg@mail.gmail.com> |
--===============5838302034125409074==
Content-Type: multipart/alternative; boundary="0000000000007dd36b05a555f5a1"
--0000000000007dd36b05a555f5a1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
The error messages are:
../../gcc-4.3.5/gcc/toplev.c:545:1: error: redefinition of =E2=80=98floor_l=
og2=E2=80=99
545 | floor_log2 (unsigned HOST_WIDE_INT x)
| ^~~~~~~~~~
In file included from ../../gcc-4.3.5/gcc/toplev.c:58:
../../gcc-4.3.5/gcc/toplev.h:177:1: note: previous definition of
=E2=80=98floor_log2=E2=80=99 wa
s here
177 | floor_log2 (unsigned HOST_WIDE_INT x)
| ^~~~~~~~~~
../../gcc-4.3.5/gcc/toplev.c:580:1: error: redefinition of =E2=80=98exact_l=
og2=E2=80=99
580 | exact_log2 (unsigned HOST_WIDE_INT x)
| ^~~~~~~~~~
In file included from ../../gcc-4.3.5/gcc/toplev.c:58:
../../gcc-4.3.5/gcc/toplev.h:183:1: note: previous definition of
=E2=80=98exact_log2=E2=80=99 wa
s here
183 | exact_log2 (unsigned HOST_WIDE_INT x)
| ^~~~~~~~~~
There is probably a GCC flag to allow such duplicate definitions, but I
haven't found it yet (apparently, it isn't -Wnoduplicate-decl-specifier).
I'm using the GCC 4.3.5 codebase and building with GCC 9.3.1 under Fedora
31 (x86_64).
I'm running configure as follows:
SRCDIR=3D../gcc-4.3.5
export CFLAGS =3D"-fkeep-inline-functions -W -Wall -Wwrite-strings \
-Wstrict-prototypes -Wmissing-prototypes \
-Wold-style-definition -Wmissing-format-attribute \
-pedantic -Wno-long-long -Wno-variadic-macros \
-Wno-overlength-strings -fno-common \
-Wnoduplicate-decl-specifier"
$SRCDIR/configure --program-suffix=3D-4.3.5 --disable-shared \
--enable-languages=3Dpascal
The definition of CFLAGS was my attempt to allow the code to compile. It
made no difference.
Any ideas as to how to proceed would be greatly appreciated.
John L. Ries
26215 197th Ave. SE
Covington, WA 98042
(435) 867-8885
--0000000000007dd36b05a555f5a1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>The error messages are:</div><div><br></div><div>../.=
./gcc-4.3.5/gcc/toplev.c:545:1: error: redefinition of =E2=80=98floor_log2=
=E2=80=99<br>=C2=A0 545 | floor_log2 (unsigned HOST_WIDE_INT x)<br>=C2=A0 =
=C2=A0 =C2=A0 | ^~~~~~~~~~<br>In file included from ../../gcc-4.3.5/gcc/top=
lev.c:58:<br>../../gcc-4.3.5/gcc/toplev.h:177:1: note: previous definition =
of =E2=80=98floor_log2=E2=80=99 wa<br>s here<br>=C2=A0 177 | floor_log2 (un=
signed HOST_WIDE_INT x)<br>=C2=A0 =C2=A0 =C2=A0 | ^~~~~~~~~~<br>../../gcc-4=
.3.5/gcc/toplev.c:580:1: error: redefinition of =E2=80=98exact_log2=E2=80=
=99<br>=C2=A0 580 | exact_log2 (unsigned HOST_WIDE_INT x)<br>=C2=A0 =C2=A0 =
=C2=A0 | ^~~~~~~~~~<br>In file included from ../../gcc-4.3.5/gcc/toplev.c:5=
8:<br>../../gcc-4.3.5/gcc/toplev.h:183:1: note: previous definition of =E2=
=80=98exact_log2=E2=80=99 wa<br>s here<br>=C2=A0 183 | exact_log2 (unsigned=
HOST_WIDE_INT x)<br>=C2=A0 =C2=A0 =C2=A0 | ^~~~~~~~~~<br></div><div><br></=
div><div>There is probably a GCC flag to allow such duplicate definitions, =
but I haven't found it yet (apparently, it isn't -Wnoduplicate-decl=
-specifier).=C2=A0 I'm using the GCC 4.3.5 codebase and building with G=
CC 9.3.1 under Fedora 31 (x86_64).</div><div><br></div><div>I'm running=
configure as follows:</div><div><br></div><div>SRCDIR=3D../gcc-4.3.5<br>ex=
port CFLAGS =3D"-fkeep-inline-functions -W -Wall -Wwrite-strings \<br>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -Wstrict-prototypes=
-Wmissing-prototypes \<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 -Wold-style-definition -Wmissing-format-attribute \<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -pedantic -Wno-long-long -Wno=
-variadic-macros \<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 -Wno-overlength-strings -fno-common \<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 -Wnoduplicate-decl-specifier"<br><br>$SRCD=
IR/configure --program-suffix=3D-4.3.5 --disable-shared \<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --enable-languages=3Dpasca=
l<br><br></div><div>The definition of CFLAGS was my attempt to allow the co=
de to compile.=C2=A0 It made no difference.<br></div><div><br></div><div>An=
y ideas as to how to proceed would be greatly appreciated. <br></div><div><=
br></div><div><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"=
gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"lt=
r"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><=
div><div>John L. Ries</div><div>26215 197th Ave. SE<br></div><div>Covington=
, WA=C2=A0 98042<br></div>(435) 867-8885<br></div></div></div></div></div><=
/div></div></div></div></div></div></div></div></div></div></div>
--0000000000007dd36b05a555f5a1--
--===============5838302034125409074==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Gpc mailing list
[email protected]
https://www.g-n-u.de/mailman/listinfo/gpc
--===============5838302034125409074==--