On Tue, Jun 06, 2017 at 04:53:27PM +0100, Stuart Henderson wrote:
> On 2017/06/06 11:12, Bryan Steele wrote:
> > On Mon, Jun 05, 2017 at 11:58:43AM -0400, Bryan Steele wrote:
> > > This will probably require library and ports bumps
> > 
> > I'm not sure where to go from here, bumping estdc++ should take
> > care of any ports using eg++, but there are still a few ports
> > using egcc for emulated TLS support.
> 
> Or for C11, or because of miscompiles with gcc 4.2, or various other
> reasons.

Right.

> > What about the other shared libraries, gfortran, objc.. or other
> > bootstraps? The installed libssp is unused, and uses gets()..
> > 
> > This is something I wish someone else could help me with as I
> > don't normally do ports builds myself..
> > 
> > Not sure if this SQL query is correct.. at least some of these
> > may actually be missing an explict stdc++ wantlib? Qt5?
> 
> Qt5 is built with ports gcc so it uses estdc++ not stdc++.
> 
> Programs are not _supposed_ to link with both stdc++ and estdc++ because
> they conflict, though many things in ports do, it's unavoidable when we
> have X libraries built with gcc 4.2.

Yes, I meant estdc++ here.

> > Halp?
> > 
> > -Bryan.
> > 
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
> > retrieving revision 1.47
> > diff -u -p -u -r1.47 Makefile
> > --- Makefile        4 Mar 2017 21:59:55 -0000       1.47
> > +++ Makefile        6 Jun 2017 15:10:51 -0000
> > @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = amd64 arm hppa i386 mip
> >  DPB_PROPERTIES = parallel
> >  
> >  V = 4.9.4
> > -REVISION = 4
> > +REVISION = 5
> >  FULL_VERSION = $V
> >  FULL_PKGVERSION = $V
> >  
> > @@ -39,7 +39,7 @@ PKGNAME-objc =  gobjc-${FULL_PKGVERSION}
> >  PKGNAME-ada =   gnat-${FULL_PKGVERSION}
> >  PKGSPEC-main = gcc->=4.9,<4.10
> >  
> > -SHARED_LIBS =      estdc++         17.0 \
> > +SHARED_LIBS =      estdc++         18.0 \
> 
> This conflicts with the major in lang/gcc/6. If you want to bump major
> here, you'll also have to bump it in lang/gcc/6 as well (including
> MODGCC4_CPPWANTLIB in 6/gcc4.port.mk). I don't see why you would bump
> major though, you're just trying to trigger an update aren't you? Minor
> is enough for that.

Yeah, we just need to recompile dependant ports, no symbol changes.

>From what I can tell, gcc6 is not linked to the build yet, but it
would also require a similar patch, probably closer to what was
committed upstream.

> 
> >             gfortran        6.0 \
> >             gcj             4.0 \
> >             gcj-tools       4.0 \
> > Index: patches/patch-gcc_config_i386_i386_c
> > ===================================================================
> > RCS file: /cvs/ports/lang/gcc/4.9/patches/patch-gcc_config_i386_i386_c,v
> > retrieving revision 1.4
> > diff -u -p -u -r1.4 patch-gcc_config_i386_i386_c
> > --- patches/patch-gcc_config_i386_i386_c    1 Sep 2016 17:30:33 -0000       
> > 1.4
> > +++ patches/patch-gcc_config_i386_i386_c    6 Jun 2017 15:10:51 -0000
> > @@ -1,6 +1,6 @@
> >  $OpenBSD: patch-gcc_config_i386_i386_c,v 1.4 2016/09/01 17:30:33 pascal 
> > Exp $
> > ---- gcc/config/i386/i386.c.orig    Mon Aug  1 18:03:41 2016
> > -+++ gcc/config/i386/i386.c Sat Aug  6 19:19:04 2016
> > +--- gcc/config/i386/i386.c.orig    Mon Aug  1 12:03:41 2016
> > ++++ gcc/config/i386/i386.c Sun Jun  4 04:30:01 2017
> >  @@ -2307,6 +2307,8 @@ struct ix86_frame
> >     HOST_WIDE_INT reg_save_offset;
> >     HOST_WIDE_INT sse_reg_save_offset;
> > @@ -18,13 +18,22 @@ $OpenBSD: patch-gcc_config_i386_i386_c,v
> >     frame->nregs = ix86_nsaved_regs ();
> >     frame->nsseregs = ix86_nsaved_sseregs ();
> >   
> > -@@ -10903,6 +10906,9 @@ ix86_expand_prologue (void)
> > -       m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
> > +@@ -10904,6 +10907,9 @@ ix86_expand_prologue (void)
> >         m->fs.realigned = true;
> >       }
> > -+
> > + 
> >  +  if (warn_stack_larger_than && frame.local_size > stack_larger_than_size)
> >  +    warning (OPT_Wstack_larger_than_, "stack usage is %ld bytes", 
> > frame.local_size);
> > - 
> > ++
> >     int_registers_saved = (frame.nregs == 0);
> >     sse_registers_saved = (frame.nsseregs == 0);
> > + 
> > +@@ -26860,7 +26866,7 @@ ix86_local_alignment (tree exp, enum machine_mode 
> > mode
> > +              != TYPE_MAIN_VARIANT (va_list_type_node)))
> > +      && TYPE_SIZE (type)
> > +      && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
> > +-     && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 16
> > ++     && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
> > +          || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
> > +   return 128;
> > +     }
> > 
> > 
> > SELECT FULLPKGPATH,MODULES,WANTLIB FROM Ports WHERE MODULES LIKE '%gcc4%' 
> > AND WA
> > NTLIB NOT LIKE '%CXX%' AND WANTLIB NOT LIKE '%stdc++%';
> 
> I think you're actually wanting
> 
> ... wantlib not like '%LIBECXX%' and wantlib not like '%estdc++%'

I believe the point here was to generate a list of ports using ports gcc4,
but not depending on C++, so this should exclude both.

-Bryan.

Reply via email to