Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 2010 14:54:09 GMT
From:      Andrius Morkunas <hinokind@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/144791: [patch] databases/mysql40-server fix build with gcc42
Message-ID:  <201003161454.o2GEs9P0034410@www.freebsd.org>
Resent-Message-ID: <201003161500.o2GF04fB095089@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         144791
>Category:       ports
>Synopsis:       [patch] databases/mysql40-server fix build with gcc42
>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:   Tue Mar 16 15:00:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Andrius Morkunas
>Release:        
>Organization:
>Environment:
>Description:
Get rid of USE_GCC=3.4
>How-To-Repeat:

>Fix:
The patch prevents gcc from using min/max operators.
http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_6.html#SEC116

Patch attached with submission follows:

diff -ruN databases/mysql40-server.orig/Makefile databases/mysql40-server/Makefile
--- databases/mysql40-server.orig/Makefile	2010-01-11 11:58:38.000000000 +0000
+++ databases/mysql40-server/Makefile	2010-03-16 14:39:25.512368548 +0000
@@ -71,9 +71,6 @@
 CFLAGS+=	${PTHREAD_CFLAGS}
 .endif
 
-.if ${OSVERSION} >= 700000
-USE_GCC=	3.4
-.endif
 .if defined(BUILD_OPTIMIZED)
 CFLAGS+=	-O3 -fno-omit-frame-pointer -fno-gcse
 .endif
@@ -121,6 +118,8 @@
 .if defined(WITH_PROC_SCOPE_PTH)
 	@${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/libmysqld/lib_sql.cc ${WRKSRC}/sql/mysqld.cc
 .endif
+	@${REINPLACE_CMD} -e 's|\&\& defined(__GNUC__)|\&\& defined(__GNUC__) \&\& 0|' \
+		${WRKSRC}/include/my_global.h
 
 post-install:
 .if !defined(PACKAGE_BUILDING)
@@ -148,6 +147,8 @@
 .if defined(WITH_PROC_SCOPE_PTH)
 	@${REINPLACE_CMD} -e "s|PTHREAD_SCOPE_SYSTEM|PTHREAD_SCOPE_PROCESS|g" ${WRKSRC}/tools/mysqlmanager.c
 .endif
+	@${REINPLACE_CMD} -e 's|\&\& defined(__GNUC__)|\&\& defined(__GNUC__) \&\& 0|' \
+		${WRKSRC}/include/my_global.h
 
 .else
 # MySQL-Scripts part


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003161454.o2GEs9P0034410>