ports/154927: Update lang/llvm-gcc4 with FreeBSD specific patches

Pedro Giffuni giffunip at tutopia.com
Mon Feb 21 03:20:09 UTC 2011


>Number:         154927
>Category:       ports
>Synopsis:       Update lang/llvm-gcc4 with FreeBSD specific patches
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 21 03:20:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Pedro Giffuni
>Release:        8.1-Release
>Organization:
>Environment:
$ uname -a
FreeBSD mogwai.giffuni.net 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sat Jul 17 14:19:59 PDT 2010     root at build8x64.pcbsd.org:/usr/obj/usr/pcbsd-build81/fbsd-source/8.1/sys/PCBSD  amd64

>Description:
Add two minor patches from our base distribution that are unlikely to be accepted upstream.

SVN Revision 181538
Make -fno-math-errno the default. Our libm doesn't support the SysV
mistake of setting errno, and never has.  This will need to be fixed
upstream in a more generic way, but the changes are somewhat more
involved.

SVN Revision 198344
Change gcc to assume a default machine architecture of 486 instead of 386
on "i386".  Doing it in the compiler is deemed to be less fragile then
attempting to provide a default -march setting via bsd.cpu.mk.  FreeBSD
itself has not supported plain 386 CPUs since 5.x.

>How-To-Repeat:

>Fix:
Patch attached.

Patch attached with submission follows:

diff -ruN llvm-gcc4.orig/files/patch-.._gcc_common.opt llvm-gcc4/files/patch-.._gcc_common.opt
--- llvm-gcc4.orig/files/patch-.._gcc_common.opt	1970-01-01 00:00:00.000000000 +0000
+++ llvm-gcc4/files/patch-.._gcc_common.opt	2011-02-20 21:54:50.000000000 +0000
@@ -0,0 +1,13 @@
+--- ../gcc/common.opt.orig	2010-07-15 23:10:17.000000000 +0000
++++ ../gcc/common.opt	2011-02-20 21:54:36.000000000 +0000
+@@ -730,8 +730,8 @@
+ 
+ ; APPLE LOCAL begin optimization pragmas 3124235/3420242
+ fmath-errno
+-Common Report Var(flag_errno_math) Init(1) PerFunc
+-Set errno after built-in math functions
++Common Report Var(flag_errno_math) Init(0) PerFunc
++FreeBSD does not set errno after built-in math functions
+ ; APPLE LOCAL end optimization pragmas 3124235/3420242
+ 
+ fmem-report
diff -ruN llvm-gcc4.orig/files/patch-.._gcc_config_i386_i386.c llvm-gcc4/files/patch-.._gcc_config_i386_i386.c
--- llvm-gcc4.orig/files/patch-.._gcc_config_i386_i386.c	1970-01-01 00:00:00.000000000 +0000
+++ llvm-gcc4/files/patch-.._gcc_config_i386_i386.c	2011-02-20 21:49:31.000000000 +0000
@@ -0,0 +1,11 @@
+--- ../gcc/config/i386/i386.c.orig	2011-02-20 21:45:59.000000000 +0000
++++ ../gcc/config/i386/i386.c	2011-02-20 21:47:35.000000000 +0000
+@@ -1762,7 +1762,7 @@
+ 	     "-mtune=generic instead as appropriate.");
+ 
+   if (!ix86_arch_string)
+-    ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386";
++    ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486";
+   /* APPLE LOCAL begin mainline */
+   else
+     ix86_arch_specified = 1;


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list