mirror of
https://github.com/golang/go
synced 2024-11-21 16:44:43 -07:00
build: avoid redundant bss declarations
Some compilers care, sadly. R=iant, ken CC=golang-dev https://golang.org/cl/4931042
This commit is contained in:
parent
af18e4b9b0
commit
5e188b40f2
@ -118,7 +118,10 @@ HOST_AR?=ar
|
||||
HOST_EXTRA_CFLAGS?=-ggdb -O2
|
||||
HOST_EXTRA_LDFLAGS?=
|
||||
|
||||
HOST_CFLAGS=-I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS)
|
||||
# The -fno-common here is not necessary, but some compilers
|
||||
# on OS X seem to set it by default. Setting it here keeps the build
|
||||
# working in that non-standard context.
|
||||
HOST_CFLAGS=-fno-common -I"$(GOROOT)/include" $(HOST_EXTRA_CFLAGS)
|
||||
HOST_LDFLAGS=$(HOST_EXTRA_LDFLAGS)
|
||||
PWD=$(shell pwd)
|
||||
|
||||
|
@ -181,7 +181,7 @@ EXTERN int32 maxargsafe;
|
||||
EXTERN int mnstring;
|
||||
EXTERN Multab multab[20];
|
||||
EXTERN int retok;
|
||||
EXTERN int hintabsize;
|
||||
extern int hintabsize;
|
||||
EXTERN Node* nodrat;
|
||||
EXTERN Node* nodret;
|
||||
EXTERN Node* nodsafe;
|
||||
|
@ -5,13 +5,13 @@
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#include "../gc/go.h"
|
||||
#include "../5l/5.out.h"
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
typedef struct Addr Addr;
|
||||
|
||||
struct Addr
|
||||
@ -51,22 +51,19 @@ struct Prog
|
||||
#define REGALLOC_F0 (REGALLOC_RMAX+1)
|
||||
#define REGALLOC_FMAX (REGALLOC_F0 + FREGEXT)
|
||||
|
||||
EXTERN Biobuf* bout;
|
||||
EXTERN int32 dynloc;
|
||||
EXTERN uchar reg[REGALLOC_FMAX+1];
|
||||
EXTERN int32 pcloc; // instruction counter
|
||||
EXTERN Strlit emptystring;
|
||||
extern char* anames[];
|
||||
EXTERN Hist* hist;
|
||||
EXTERN Prog zprog;
|
||||
EXTERN Node* curfn;
|
||||
EXTERN Node* newproc;
|
||||
EXTERN Node* deferproc;
|
||||
EXTERN Node* deferreturn;
|
||||
EXTERN Node* panicindex;
|
||||
EXTERN Node* panicslice;
|
||||
EXTERN Node* throwreturn;
|
||||
EXTERN long unmappedzero;
|
||||
extern long unmappedzero;
|
||||
EXTERN int maxstksize;
|
||||
|
||||
/*
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#define EXTERN
|
||||
#include "l.h"
|
||||
#include "../ld/lib.h"
|
||||
|
||||
|
@ -5,13 +5,13 @@
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#include "../gc/go.h"
|
||||
#include "../6l/6.out.h"
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
typedef struct Addr Addr;
|
||||
|
||||
struct Addr
|
||||
@ -44,22 +44,19 @@ struct Prog
|
||||
void* reg; // pointer to containing Reg struct
|
||||
};
|
||||
|
||||
EXTERN Biobuf* bout;
|
||||
EXTERN int32 dynloc;
|
||||
EXTERN uchar reg[D_NONE];
|
||||
EXTERN int32 pcloc; // instruction counter
|
||||
EXTERN Strlit emptystring;
|
||||
extern char* anames[];
|
||||
EXTERN Hist* hist;
|
||||
EXTERN Prog zprog;
|
||||
EXTERN Node* curfn;
|
||||
EXTERN Node* newproc;
|
||||
EXTERN Node* deferproc;
|
||||
EXTERN Node* deferreturn;
|
||||
EXTERN Node* panicindex;
|
||||
EXTERN Node* panicslice;
|
||||
EXTERN Node* throwreturn;
|
||||
EXTERN vlong unmappedzero;
|
||||
extern vlong unmappedzero;
|
||||
|
||||
/*
|
||||
* gen.c
|
||||
|
@ -29,8 +29,6 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "gg.h"
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#include "opt.h"
|
||||
|
||||
#define NREGVAR 32 /* 16 general + 16 floating */
|
||||
|
@ -5,13 +5,13 @@
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
|
||||
#include "../gc/go.h"
|
||||
#include "../8l/8.out.h"
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#include "../gc/go.h"
|
||||
#include "../8l/8.out.h"
|
||||
|
||||
typedef struct Addr Addr;
|
||||
|
||||
struct Addr
|
||||
@ -54,15 +54,12 @@ enum
|
||||
Fpop2 = 1<<2,
|
||||
};
|
||||
|
||||
EXTERN Biobuf* bout;
|
||||
EXTERN int32 dynloc;
|
||||
EXTERN uchar reg[D_NONE];
|
||||
EXTERN int32 pcloc; // instruction counter
|
||||
EXTERN Strlit emptystring;
|
||||
extern char* anames[];
|
||||
EXTERN Hist* hist;
|
||||
EXTERN Prog zprog;
|
||||
EXTERN Node* curfn;
|
||||
EXTERN Node* newproc;
|
||||
EXTERN Node* deferproc;
|
||||
EXTERN Node* deferreturn;
|
||||
|
@ -29,8 +29,6 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "gg.h"
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#include "opt.h"
|
||||
|
||||
#define NREGVAR 8
|
||||
|
@ -2,7 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#define EXTERN
|
||||
#include "go.h"
|
||||
#include "y.tab.h"
|
||||
#include <ar.h>
|
||||
|
Loading…
Reference in New Issue
Block a user