From: John Marino Date: Sat, 28 Jan 2012 17:19:55 +0000 (+0100) Subject: CCVER=gcc46: Minor tweaks for buildworld X-Git-Tag: v3.4.0rc~1293 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/b6a97bf5855743979f9e4f93cdce9831b839c045 CCVER=gcc46: Minor tweaks for buildworld Currently WORLD_CCVER=gcc46 will break on gcc4.1, include/rpcsvc, and is not recognized by libc. This commit will fix that. The nis.x fix is the least understood as the gnatcpp seems not to like multiline macros when used with rpcgen. --- diff --git a/gnu/usr.bin/cc41/cc_prep/gthr-default.h b/gnu/usr.bin/cc41/cc_prep/gthr-default.h index 98f47211f7..fc2d8eb3bb 100644 --- a/gnu/usr.bin/cc41/cc_prep/gthr-default.h +++ b/gnu/usr.bin/cc41/cc_prep/gthr-default.h @@ -1,3 +1,7 @@ -/* $DragonFly: src/gnu/usr.bin/cc41/cc_prep/gthr-default.h,v 1.1 2006/09/27 12:10:33 corecode Exp $ */ +/* XXX marino: disable GTHREAD_USE_WEAK to deal with gcc 4.6 error + weakref '__gthrw_' must have static linkage. + GTHREAD is for use with GNAT, the Ada compiler, which isn't + even switched on. */ +#define GTHREAD_USE_WEAK 0 #include "gthr-posix.h" diff --git a/include/rpcsvc/nis.x b/include/rpcsvc/nis.x index e4708fed40..0eebabab55 100644 --- a/include/rpcsvc/nis.x +++ b/include/rpcsvc/nis.x @@ -28,7 +28,6 @@ % * Mountain View, California 94043 % * % * $FreeBSD: src/include/rpcsvc/nis.x,v 1.6 2003/05/04 02:51:42 obrien Exp $ -% * $DragonFly: src/include/rpcsvc/nis.x,v 1.2 2003/06/17 04:25:58 dillon Exp $ % */ /* @@ -397,10 +396,7 @@ program NIS_PROG { %#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) %#define WORLD_DEFAULT (NIS_READ_ACC) %#define GROUP_DEFAULT (NIS_READ_ACC << 8) -%#define OWNER_DEFAULT ((NIS_READ_ACC +\ - NIS_MODIFY_ACC +\ - NIS_CREATE_ACC +\ - NIS_DESTROY_ACC) << 16) +%#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) << 16) %#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) % %/* Result manipulation defines ... */ @@ -429,10 +425,8 @@ program NIS_PROG { % * these definitions they take an nis_object *, and an int and return % * a u_char * for Value, and an int for length. % */ -%#define ENTRY_VAL(obj, col) \ - (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val -%#define ENTRY_LEN(obj, col) \ - (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len +%#define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val +%#define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len % %#ifdef __cplusplus %} diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 2bcdbf398a..e3c747aa54 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -1,6 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # $FreeBSD: src/lib/libc/Makefile,v 1.24 1999/09/29 15:18:29 marcel Exp $ -# $DragonFly: src/lib/libc/Makefile,v 1.14 2007/01/16 07:16:22 dillon Exp $ # # All library objects contain rcsid strings by default; they may be # excluded as a space-saving measure. To produce a library that does @@ -14,7 +13,7 @@ AINC= -I${.OBJDIR} -I${.CURDIR}/${MACHINE_ARCH} CLEANFILES+=tags PRECIOUSLIB= yes -.if ${CCVER} != "clang" && ${CCVER} != "clangsvn" +.if ${CCVER} == "gcc41" || ${CCVER} == "gcc44" DPADD+= ${LIBGCC} LDADD+= -lgcc .endif