mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-22 23:04:12 -07:00
Squelching bogus type pun warnings from gcc 4.7 to get a clean build in travis ci.
Adding platform XCI6GC to allow faster debugging of CI builds on Mac OS X with MacPorts GCC 4.7 installed. Not otherwise supported. Copied from Perforce Change: 191357 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
c393e1e70a
commit
fe91fa9480
9 changed files with 115 additions and 13 deletions
|
|
@ -125,7 +125,7 @@ static Bool cbsTestNode(SplayTree splay, Tree tree, void *closure)
|
|||
AVERT(Tree, tree);
|
||||
AVER(sizeP != NULL);
|
||||
AVER(*sizeP > 0);
|
||||
AVER(IsA(CBSFast, CBSLand(cbsOfSplay(splay))));
|
||||
AVER(IsA(CBSFast, cbsOfSplay(splay)));
|
||||
|
||||
block = cbsBlockOfTree(tree);
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ static Bool cbsTestTree(SplayTree splay, Tree tree,
|
|||
AVERT(Tree, tree);
|
||||
AVER(sizeP != NULL);
|
||||
AVER(*sizeP > 0);
|
||||
AVER(IsA(CBSFast, CBSLand(cbsOfSplay(splay))));
|
||||
AVER(IsA(CBSFast, cbsOfSplay(splay)));
|
||||
|
||||
block = cbsFastBlockOfTree(tree);
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ static void cbsUpdateFastNode(SplayTree splay, Tree tree)
|
|||
|
||||
AVERT_CRITICAL(SplayTree, splay);
|
||||
AVERT_CRITICAL(Tree, tree);
|
||||
AVER_CRITICAL(IsA(CBSFast, CBSLand(cbsOfSplay(splay))));
|
||||
AVER_CRITICAL(IsA(CBSFast, cbsOfSplay(splay)));
|
||||
|
||||
maxSize = CBSBlockSize(cbsBlockOfTree(tree));
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ static void cbsUpdateZonedNode(SplayTree splay, Tree tree)
|
|||
|
||||
AVERT_CRITICAL(SplayTree, splay);
|
||||
AVERT_CRITICAL(Tree, tree);
|
||||
AVER_CRITICAL(IsA(CBSZoned, CBSLand(cbsOfSplay(splay))));
|
||||
AVER_CRITICAL(IsA(CBSZoned, cbsOfSplay(splay)));
|
||||
|
||||
cbsUpdateFastNode(splay, tree);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,19 @@ typedef struct CBSZonedBlockStruct {
|
|||
typedef struct CBSStruct *CBS, *CBSFast, *CBSZoned;
|
||||
|
||||
extern Bool CBSCheck(CBS cbs);
|
||||
|
||||
|
||||
/* CBSLand -- convert CBS to Land
|
||||
*
|
||||
* We would like to use MustBeA(Land, cbs) for this, but it produces
|
||||
* bogus warnings about strict aliasing from GCC 4.7 (and probably
|
||||
* 4.8). We can abolish this macro when those are no longer in use in
|
||||
* MPS development.
|
||||
*/
|
||||
|
||||
#define CBSLand(cbs) (&(cbs)->landStruct)
|
||||
|
||||
|
||||
DECLARE_CLASS(Land, CBS, Land);
|
||||
DECLARE_CLASS(Land, CBSFast, CBS);
|
||||
DECLARE_CLASS(Land, CBSZoned, CBSFast);
|
||||
|
|
|
|||
|
|
@ -142,6 +142,29 @@
|
|||
#define MPS_PF_ALIGN 4 /* I'm just guessing. */
|
||||
|
||||
|
||||
/* gcc-mp-4.7 (MacPorts gcc47 4.7.4_5) 4.7.4
|
||||
* gcc -E -dM
|
||||
* Note that Clang also defines __GNUC__ since it's generally GCC compatible,
|
||||
* but that doesn't fit our system so we exclude Clang here.
|
||||
*/
|
||||
|
||||
#elif defined(__APPLE__) && defined(__x86_64__) && defined(__MACH__) \
|
||||
&& defined(__GNUC__) && !defined(__clang__)
|
||||
#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_XCI6GC)
|
||||
#error "specified CONFIG_PF_... inconsistent with detected xci6gc"
|
||||
#endif
|
||||
#define MPS_PF_XCI6GC
|
||||
#define MPS_PF_STRING "xci6gc"
|
||||
#define MPS_OS_XC
|
||||
#define MPS_ARCH_I6
|
||||
#define MPS_BUILD_GC
|
||||
#define MPS_T_WORD unsigned long
|
||||
#define MPS_T_ULONGEST unsigned long
|
||||
#define MPS_WORD_WIDTH 64
|
||||
#define MPS_WORD_SHIFT 6
|
||||
#define MPS_PF_ALIGN 8
|
||||
|
||||
|
||||
/* Apple clang version 3.1, clang -E -dM */
|
||||
|
||||
#elif defined(__APPLE__) && defined(__i386__) && defined(__MACH__) \
|
||||
|
|
|
|||
|
|
@ -1828,7 +1828,7 @@ Bool AMSCheck(AMS ams)
|
|||
CHECKS(AMS, ams);
|
||||
CHECKC(AMSPool, ams);
|
||||
CHECKD(Pool, AMSPool(ams));
|
||||
CHECKL(IsA(AMSPool, AMSPool(ams)));
|
||||
CHECKL(IsA(AMSPool, ams));
|
||||
CHECKL(PoolAlignment(AMSPool(ams)) == AMSGrainsSize(ams, (Size)1));
|
||||
CHECKL(PoolAlignment(AMSPool(ams)) == AMSPool(ams)->format->alignment);
|
||||
if (ams->pgen != NULL) {
|
||||
|
|
|
|||
|
|
@ -915,7 +915,6 @@ Bool MVCheck(MV mv)
|
|||
CHECKS(MV, mv);
|
||||
CHECKC(MVPool, mv);
|
||||
CHECKD(Pool, MVPool(mv));
|
||||
CHECKL(IsA(MVPool, MVPool(mv)));
|
||||
CHECKD(MFS, &mv->blockPoolStruct);
|
||||
CHECKD(MFS, &mv->spanPoolStruct);
|
||||
CHECKL(mv->extendBy > 0);
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ DECLARE_CLASS(Pool, MVFFDebugPool, MVFFPool);
|
|||
|
||||
#define PoolMVFF(pool) PARENT(MVFFStruct, poolStruct, pool)
|
||||
#define MVFFPool(mvff) (&(mvff)->poolStruct)
|
||||
#define MVFFTotalLand(mvff) CBSLand(&(mvff)->totalCBSStruct)
|
||||
#define MVFFFreePrimary(mvff) CBSLand(&(mvff)->freeCBSStruct)
|
||||
#define MVFFTotalLand(mvff) (&(mvff)->totalCBSStruct.landStruct)
|
||||
#define MVFFFreePrimary(mvff) (&(mvff)->freeCBSStruct.landStruct)
|
||||
#define MVFFFreeSecondary(mvff) FreelistLand(&(mvff)->flStruct)
|
||||
#define MVFFFreeLand(mvff) FailoverLand(&(mvff)->foStruct)
|
||||
#define MVFFLocusPref(mvff) (&(mvff)->locusPrefStruct)
|
||||
|
|
@ -779,7 +779,6 @@ static Bool MVFFCheck(MVFF mvff)
|
|||
CHECKS(MVFF, mvff);
|
||||
CHECKC(MVFFPool, mvff);
|
||||
CHECKD(Pool, MVFFPool(mvff));
|
||||
CHECKL(IsA(MVFFPool, MVFFPool(mvff)));
|
||||
CHECKD(LocusPref, MVFFLocusPref(mvff));
|
||||
CHECKL(mvff->extendBy >= ArenaGrainSize(PoolArena(MVFFPool(mvff))));
|
||||
CHECKL(mvff->avgSize > 0); /* see .arg.check */
|
||||
|
|
|
|||
|
|
@ -698,7 +698,6 @@ static Bool SNCCheck(SNC snc)
|
|||
CHECKS(SNC, snc);
|
||||
CHECKC(SNCPool, snc);
|
||||
CHECKD(Pool, SNCPool(snc));
|
||||
CHECKL(ClassOfPoly(Pool, SNCPool(snc)) == CLASS(SNCPool));
|
||||
if (snc->freeSegs != NULL) {
|
||||
CHECKD(Seg, snc->freeSegs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,11 +74,13 @@
|
|||
*
|
||||
* We use the address of the static storage for the canonical class
|
||||
* object as the class id, suitable for fast comparison. This is not
|
||||
* intended to be dereferences, so it's defined as a pointer to an
|
||||
* incomplete structure.
|
||||
* intended to be dereferences. We would like to define it as a
|
||||
* pointer to an incomplete structure, but GCC 4.7 buggily complains
|
||||
* about punning if we do that, so use void *, even though that's a
|
||||
* bit more error prone.
|
||||
*/
|
||||
|
||||
typedef struct ClassIdStruct *ClassId;
|
||||
typedef void *ClassId;
|
||||
#define CLASS_ID(klass) ((ClassId)&CLASS_STATIC(klass))
|
||||
|
||||
|
||||
|
|
|
|||
69
mps/code/xci6gc.gmk
Normal file
69
mps/code/xci6gc.gmk
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
# -*- makefile -*-
|
||||
#
|
||||
# xci6gc.gmk: BUILD FOR MAC OS X/x86_64/GCC PLATFORM
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (c) 2001-2016 Ravenbrook Limited. See end of file for license.
|
||||
#
|
||||
# .prefer.xcode: The documented and preferred way to develop the MPS
|
||||
# for this platform is to use the Xcode project (mps.xcodeproj). This
|
||||
# makefile provides a way to compile the MPS one source file at a
|
||||
# time, rather than all at once via mps.c (which can hide errors due
|
||||
# to missing headers).
|
||||
|
||||
PFM = xci6gc
|
||||
|
||||
MPMPF = \
|
||||
lockix.c \
|
||||
prmci6xc.c \
|
||||
proti6.c \
|
||||
protix.c \
|
||||
protxc.c \
|
||||
span.c \
|
||||
ssixi6.c \
|
||||
thxc.c \
|
||||
vmix.c
|
||||
|
||||
include gc.gmk
|
||||
include comm.gmk
|
||||
|
||||
|
||||
# C. COPYRIGHT AND LICENSE
|
||||
#
|
||||
# Copyright (C) 2001-2016 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
# All rights reserved. This is an open source license. Contact
|
||||
# Ravenbrook for commercial licensing options.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. Redistributions in any form must be accompanied by information on how
|
||||
# to obtain complete source code for this software and any accompanying
|
||||
# software that uses this software. The source code must either be
|
||||
# included in the distribution or be available for no more than the cost
|
||||
# of distribution plus a nominal fee, and must be freely redistributable
|
||||
# under reasonable conditions. For an executable file, complete source
|
||||
# code means the source code for all modules it contains. It does not
|
||||
# include source code for modules or files that typically accompany the
|
||||
# major components of the operating system on which the executable file
|
||||
# runs.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
# PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Loading…
Add table
Add a link
Reference in a new issue