Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#53802 closed update (fixed)

x86_64-elf-gcc @6.3.0_0: Port update

Reported by: stevecheckoway (Stephen Checkoway) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: anatol (Anatol Pomozov), mojca (Mojca Miklavec)
Port: x86_64-elf-gcc

Description

This is a request for an update of x86_64-elf-gcc to the latest version. I've attached a diff of the Portfile. Running it as is gives the warnings

Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/Makefile.in
Warning: reinplace s|@file{cppinternals}|@file{x86_64-elf-cppinternals}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/doc/cppinternals.texi
Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/Makefile.in
Warning: reinplace s|@file{gcc}|@file{x86_64-elf-gcc}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/doc/gcc.texi
Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/Makefile.in
Warning: reinplace s|@file{gccint}|@file{x86_64-elf-gccint}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/doc/gccint.texi
Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/Makefile.in
Warning: reinplace s|setfilename gccinstall.info|setfilename x86_64-elf-gccinstall.info|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/doc/gccinstall.info
Warning: reinplace s|@file{gccinstall}|@file{x86_64-elf-gccinstall}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/doc/gccinstall.info
Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/Makefile.in
Warning: reinplace s|@file{gfortran}|@file{x86_64-elf-gfortran}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/gcc/fortran/gfortran.texi
Warning: reinplace s|setfilename libquadmath.info|setfilename x86_64-elf-libquadmath.info|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/libquadmath/libquadmath.info
Warning: reinplace s|@file{libquadmath}|@file{x86_64-elf-libquadmath}|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/libquadmath/libquadmath.info
Warning: reinplace s|--info-dir=$(DESTDIR)$(infodir)|--dir-file=$(DESTDIR)$(infodir)/x86_64-elf-gcc-dir|g didn't change anything in /opt/local/var/macports/build/_Users_steve_ports_cross_x86_64-elf-gcc/x86_64-elf-gcc/work/gcc-6.3.0/libquadmath/Makefile.in

and installing gives the warning

Warning: x86_64-elf-gcc installs files outside the common directory structure.

so I think something more needs to be done. The first group of warnings seem to come from the -crossgcc.setup function but otherwise seem harmless (namely the man and info pages seem fine). Fixing the second warning likely involves fixing something upstream (or having a local patch), but I haven't investigated it.

Attachments (2)

0001-x86_64-elf-gcc-Update-to-gcc-7.1.0-newlib-2.5.0.patch (1.7 KB) - added by raimue (Rainer Müller) 3 years ago.
Portfile.diff (1.6 KB) - added by stevecheckoway (Stephen Checkoway) 3 years ago.
Update to 7.1.0.

Download all attachments as: .zip

Change History (19)

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: nategriswold@… removed
Owner: set to nategriswold@…
Status: newassigned

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Owner: nategriswold@… deleted

See #53855.

comment:3 Changed 3 years ago by anatol (Anatol Pomozov)

x86_64-elf-gcc is a useful tool for cross compilation and it would be great to see it updated to the latest stable version (that is 7.1 at this moment). Would it be possible to bump the package?

comment:4 Changed 3 years ago by anatol (Anatol Pomozov)

Cc: anatol added

Changed 3 years ago by raimue (Rainer Müller)

comment:5 Changed 3 years ago by raimue (Rainer Müller)

The attached patch proposes an update to gcc 7.1.0 and newlib 2.5.0. However, the resulting destroot looks like it will very likely conflict with the native gcc on ${prefix}/lib/libcc1.so. Most probably this needs a patch to move libcc1 to the appropriate subdirectory. Other distributions might already have it, but I have not looked.

$ ls -lA work/destroot/opt/local/lib/
total 272
drwxr-xr-x  3 root  admin     102 Jun 17 02:35 gcc/
-rwxr-xr-x  1 root  admin  133848 Jun 17 02:36 libcc1.0.so*
lrwxr-xr-x  1 root  admin      11 Jun 17 02:36 libcc1.so@ -> libcc1.0.so

Changed 3 years ago by stevecheckoway (Stephen Checkoway)

Attachment: Portfile.diff added

Update to 7.1.0.

comment:6 in reply to:  5 Changed 3 years ago by stevecheckoway (Stephen Checkoway)

Replying to raimue:

The attached patch proposes an update to gcc 7.1.0 and newlib 2.5.0. However, the resulting destroot looks like it will very likely conflict with the native gcc on ${prefix}/lib/libcc1.so. Most probably this needs a patch to move libcc1 to the appropriate subdirectory. Other distributions might already have it, but I have not looked.

$ ls -lA work/destroot/opt/local/lib/
total 272
drwxr-xr-x  3 root  admin     102 Jun 17 02:35 gcc/
-rwxr-xr-x  1 root  admin  133848 Jun 17 02:36 libcc1.0.so*
lrwxr-xr-x  1 root  admin      11 Jun 17 02:36 libcc1.so@ -> libcc1.0.so

What directory should those be in? This Debian bug looks related, but MacPorts doesn't use a cross-gcc directory.

comment:7 Changed 3 years ago by stevecheckoway (Stephen Checkoway)

For what it's worth, the gcc7 port puts its libcc1.so in ${prefix}/lib/gcc7.

comment:8 Changed 3 years ago by raimue (Rainer Müller)

How about ${prefix}/lib/gcc/x86_64-elf/, that would avoid the conflicts. Another step would be to fix path references to this file from other binaries or libraries in the installed files, probably using install_name_tool. Maybe it would even be easier to patch the path in gcc Makefiles.

comment:9 Changed 2 years ago by mojca (Mojca Miklavec)

Debian puts these files under

/usr/lib/gcc-cross/<triple>/7/libcc1.so

What is the difference between these files, so that they are placed to different folders?

/opt/local/lib/gcc/x86_64-elf/7.3.0/plugin/libcc1plugin.0.so
/opt/local/lib/libcc1.0.so
Last edited 2 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:10 Changed 2 years ago by mojca (Mojca Miklavec)

Note that on my computer:

> port provides /opt/local/lib/libcc1.0.so
/opt/local/lib/libcc1.0.so is provided by: avr-gcc

In my opinion it makes no sense to wait for another two years to solve the issue before updating the port. Let's update the port and solve this issues independently inside another ticket.

Other than compiler blacklisting issues (which I ignored in other ports) the port could now be as simple as

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           crossgcc 1.0
crossgcc.setup      x86_64-elf 7.3.0
crossgcc.setup_libc newlib 3.0.0 

comment:11 Changed 2 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:12 Changed 2 years ago by mojca (Mojca Miklavec)

Quoting myself from 2 years ago (I just found this on the MinGW-w64 mailing list):

I just wanted to say that I "solved" the problem for now by adding

--disable-libcc1

to the configure flags as suggested on the GCC's IRC channel.

I opened #57153 for tracking this particular problem independently from the update itself.

Last edited 2 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:13 Changed 2 years ago by mojca (Mojca Miklavec)

comment:14 Changed 2 years ago by stevecheckoway (Stephen Checkoway)

That seems reasonable to me (although I haven't tested it yet), but is there a reason to go to 7.3 and not 8.2?

comment:15 Changed 2 years ago by mojca (Mojca Miklavec)

I don't know, I switched to 7.3 as it seemed safer, but if 8.2 works fine, we could go to 8.2 of course. Feedback welcome.

comment:16 Changed 2 years ago by mojca (Mojca Miklavec)

Owner: set to mojca
Resolution: fixed
Status: assignedclosed

In 6bd4436f048aee51d0495c3afd3b191b80f582e9/macports-ports (master):

x86_64-elf-gcc: update to 8.2.0

Closes: #53802

comment:17 Changed 2 years ago by mojca (Mojca Miklavec)

In 1dbe484d53cfda128e038ffee33f5a4f7a54dfd4/macports-ports (master):

i386-elf-gcc: update to 8.2.0

See: #53802
Closes: #45834

Note: See TracTickets for help on using tickets.