On Tue, Jun 06, 2017 at 12:05:57PM -0400, Bryan Steele wrote:
> 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.

I'd like to commit at least this part, and then deal with ports
that needs REVISION or library bumps later if we have to..

libssp is not used by our stack-protector implementation and
should be removed, linking with it doesn't work.. anything
using the installed headers should be fixed.

I've bumped all other gcc shared libraries which I verified
are compiled with stack protection enabled, which is all of
them except libgcj-tools and libgo (unpackaged?)

Didn't bother with the bumps for gcc6 because nothing is
using it yet.

No idea about the bootstraps, I can't test those..

-Bryan.

Index: 4.9/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.47
diff -u -p -u -r1.47 Makefile
--- 4.9/Makefile        4 Mar 2017 21:59:55 -0000       1.47
+++ 4.9/Makefile        7 Jun 2017 20:13:25 -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,19 +39,18 @@ PKGNAME-objc =  gobjc-${FULL_PKGVERSION}
 PKGNAME-ada =   gnat-${FULL_PKGVERSION}
 PKGSPEC-main = gcc->=4.9,<4.10
 
-SHARED_LIBS =  estdc++         17.0 \
-               gfortran        6.0 \
-               gcj             4.0 \
+SHARED_LIBS =  estdc++         17.1 \
+               gfortran        6.1 \
+               gcj             4.1 \
                gcj-tools       4.0 \
-               gij             4.0 \
-               objc            6.0 \
-               ssp             4.0 \
-               lto_plugin      3.0 \
+               gij             4.1 \
+               objc            6.1 \
+               lto_plugin      3.1 \
                go              3.0 \
-               itm             2.0 \
-               atomic          1.0 \
-               quadmath        1.0 \
-               cilkrts         0.0
+               itm             2.1 \
+               atomic          1.1 \
+               quadmath        1.1 \
+               cilkrts         0.1
 
 PSEUDO_FLAVORS = no_java no_ada full
 FLAVOR ?= 
Index: 4.9/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
--- 4.9/patches/patch-gcc_config_i386_i386_c    1 Sep 2016 17:30:33 -0000       
1.4
+++ 4.9/patches/patch-gcc_config_i386_i386_c    7 Jun 2017 20:13:25 -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;
+     }
Index: 4.9/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-main,v
retrieving revision 1.10
diff -u -p -u -r1.10 PLIST-main
--- 4.9/pkg/PLIST-main  1 Sep 2016 10:56:58 -0000       1.10
+++ 4.9/pkg/PLIST-main  7 Jun 2017 20:13:25 -0000
@@ -23,12 +23,6 @@ lib/gcc/${CONFIG}/${V}/include-fixed/
 lib/gcc/${CONFIG}/${V}/include-fixed/README
 lib/gcc/${CONFIG}/${V}/include-fixed/limits.h
 lib/gcc/${CONFIG}/${V}/include-fixed/syslimits.h
-lib/gcc/${CONFIG}/${V}/include/
-lib/gcc/${CONFIG}/${V}/include/ssp/
-lib/gcc/${CONFIG}/${V}/include/ssp/ssp.h
-lib/gcc/${CONFIG}/${V}/include/ssp/stdio.h
-lib/gcc/${CONFIG}/${V}/include/ssp/string.h
-lib/gcc/${CONFIG}/${V}/include/ssp/unistd.h
 lib/gcc/${CONFIG}/${V}/install-tools/
 lib/gcc/${CONFIG}/${V}/install-tools/fixinc_list
 lib/gcc/${CONFIG}/${V}/install-tools/gsyslimits.h
@@ -239,11 +233,6 @@ lib/gcc/${CONFIG}/${V}/plugin/include/va
 lib/gcc/${CONFIG}/${V}/plugin/include/vec.h
 lib/gcc/${CONFIG}/${V}/plugin/include/version.h
 lib/libatomic.a
-lib/libssp.a
-lib/libssp.la
-@lib lib/libssp.so.${LIBssp_VERSION}
-lib/libssp_nonshared.a
-lib/libssp_nonshared.la
 @comment %%alpha%%
 %%amd64%%
 %%arm%%
Index: 6/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/6/Makefile,v
retrieving revision 1.6
diff -u -p -u -r1.6 Makefile
--- 6/Makefile  28 Dec 2016 21:48:21 -0000      1.6
+++ 6/Makefile  7 Jun 2017 20:13:25 -0000
@@ -4,6 +4,7 @@ ONLY_FOR_ARCHS = amd64 arm hppa i386 mip
 DPB_PROPERTIES = parallel
 
 V = 6.3.0
+REVISION = 0
 FULL_VERSION = $V
 FULL_PKGVERSION = $V
 
@@ -44,7 +45,6 @@ SHARED_LIBS = estdc++         18.0 \
                gcj-tools       5.0 \
                gij             5.0 \
                objc            7.0 \
-               ssp             5.0 \
                lto_plugin      4.0 \
                go              4.0 \
                itm             3.0 \
Index: 6/patches/patch-gcc_config_i386_i386_c
===================================================================
RCS file: /cvs/ports/lang/gcc/6/patches/patch-gcc_config_i386_i386_c,v
retrieving revision 1.3
diff -u -p -u -r1.3 patch-gcc_config_i386_i386_c
--- 6/patches/patch-gcc_config_i386_i386_c      28 Dec 2016 21:48:21 -0000      
1.3
+++ 6/patches/patch-gcc_config_i386_i386_c      7 Jun 2017 20:13:25 -0000
@@ -1,6 +1,8 @@
+Backport: 
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b44e9be23d38be8997ae64d7509ac22cb4c556d6
+
 $OpenBSD: patch-gcc_config_i386_i386_c,v 1.3 2016/12/28 21:48:21 pascal Exp $
---- gcc/config/i386/i386.c.orig        Wed Dec 14 16:44:07 2016
-+++ gcc/config/i386/i386.c     Fri Dec 23 18:25:11 2016
+--- gcc/config/i386/i386.c.orig        Wed Dec 14 10:44:07 2016
++++ gcc/config/i386/i386.c     Wed Jun  7 16:10:33 2017
 @@ -2476,6 +2476,8 @@ struct ix86_frame
    HOST_WIDE_INT reg_save_offset;
    HOST_WIDE_INT sse_reg_save_offset;
@@ -27,13 +29,22 @@ $OpenBSD: patch-gcc_config_i386_i386_c,v
    frame->nregs = ix86_nsaved_regs ();
    frame->nsseregs = ix86_nsaved_sseregs ();
  
-@@ -12838,6 +12841,9 @@ ix86_expand_prologue (void)
-         RTX_FRAME_RELATED_P (insn) = 1;
+@@ -12839,6 +12842,9 @@ ix86_expand_prologue (void)
        }
      }
-+
+ 
 +  if (warn_stack_larger_than && frame.local_size > stack_larger_than_size)
 +    warning (OPT_Wstack_larger_than_, "stack usage is %lld bytes", 
frame.local_size);
- 
++
    int_registers_saved = (frame.nregs == 0);
    sse_registers_saved = (frame.nsseregs == 0);
+ 
+@@ -29372,7 +29378,7 @@ ix86_local_alignment (tree exp, machine_mode mode,
+                 != TYPE_MAIN_VARIANT (va_list_type_node)))
+         && TYPE_SIZE (type)
+         && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
+-        && wi::geu_p (TYPE_SIZE (type), 16)
++        && wi::geu_p (TYPE_SIZE (type), 128)
+         && align < 128)
+       return 128;
+     }
Index: 6/pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/gcc/6/pkg/PLIST-main,v
retrieving revision 1.5
diff -u -p -u -r1.5 PLIST-main
--- 6/pkg/PLIST-main    19 Sep 2016 10:14:07 -0000      1.5
+++ 6/pkg/PLIST-main    7 Jun 2017 20:13:25 -0000
@@ -20,16 +20,10 @@
 lib/gcc/
 lib/gcc/${CONFIG}/
 lib/gcc/${CONFIG}/${V}/
-lib/gcc/${CONFIG}/${V}/include/
 lib/gcc/${CONFIG}/${V}/include-fixed/
 lib/gcc/${CONFIG}/${V}/include-fixed/README
 lib/gcc/${CONFIG}/${V}/include-fixed/limits.h
 lib/gcc/${CONFIG}/${V}/include-fixed/syslimits.h
-lib/gcc/${CONFIG}/${V}/include/ssp/
-lib/gcc/${CONFIG}/${V}/include/ssp/ssp.h
-lib/gcc/${CONFIG}/${V}/include/ssp/stdio.h
-lib/gcc/${CONFIG}/${V}/include/ssp/string.h
-lib/gcc/${CONFIG}/${V}/include/ssp/unistd.h
 lib/gcc/${CONFIG}/${V}/install-tools/
 lib/gcc/${CONFIG}/${V}/install-tools/fixinc_list
 lib/gcc/${CONFIG}/${V}/install-tools/gsyslimits.h
@@ -412,11 +406,6 @@ lib/gcc/${CONFIG}/${V}/plugin/include/xc
 lib/gcc/${CONFIG}/${V}/plugin/libcc1plugin.la
 @lib lib/gcc/${CONFIG}/${V}/plugin/libcc1plugin.so.${LIBcc1plugin_VERSION}
 lib/libatomic.a
-lib/libssp.a
-lib/libssp.la
-@lib lib/libssp.so.${LIBssp_VERSION}
-lib/libssp_nonshared.a
-lib/libssp_nonshared.la
 @comment %%alpha%%
 %%amd64%%
 %%arm%%

Reply via email to