summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwesolows <none@none>2005-08-18 18:05:02 -0700
committerwesolows <none@none>2005-08-18 18:05:02 -0700
commit159cf8a6ecac7ecbb601c9653abfd0fa878075d8 (patch)
tree8522849878731ec88a07c1301b3f43a817b6fbfb
parentfbfd105d0c38ec23cf92df531ace2c1719b48098 (diff)
downloadillumos-gate-159cf8a6ecac7ecbb601c9653abfd0fa878075d8.tar.gz
6260411 several headers have typos
6266841 the C preprocessor is feeling abused by token pasting 6268776 cw should pass the -t option to the linker 6270170 CCNEEDED should be set properly in Makefile.master for g++ builds 6271934 cw should accept -xcrossfile
-rw-r--r--usr/src/Makefile.master2
-rw-r--r--usr/src/Makefile.master.647
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c4
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c10
-rw-r--r--usr/src/cmd/sf880drd/sf880drd.h8
-rw-r--r--usr/src/head/inttypes.h2
-rw-r--r--usr/src/head/iso/stdlib_iso.h2
-rw-r--r--usr/src/head/iso/wchar_iso.h2
-rw-r--r--usr/src/head/libintl.h2
-rw-r--r--usr/src/head/regex.h2
-rw-r--r--usr/src/head/rtld_db.h14
-rw-r--r--usr/src/head/stddef.h2
-rw-r--r--usr/src/tools/cw/cw.c13
-rw-r--r--usr/src/uts/sun4u/sys/wrsm_config.h6
-rw-r--r--usr/src/uts/sun4u/sys/zulumod.h10
15 files changed, 49 insertions, 37 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 9fc8fb7164..ca9a4d09b0 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -511,7 +511,7 @@ COMPILE.java= $(JAVAC) $(JAVAFLAGS) -classpath $(CLASSPATH)
# Link time macros
#
CCNEEDED = -lC
-# XX64 What to do about libstdc++ for g++ ???
+$(__GNUC)CCNEEEDED = -L$(SFWLIBDIR) -R$(SFWLIBDIR) -lstdc++ -lgcc_s
LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
LINK64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS)
diff --git a/usr/src/Makefile.master.64 b/usr/src/Makefile.master.64
index c14ec18b16..f875031217 100644
--- a/usr/src/Makefile.master.64
+++ b/usr/src/Makefile.master.64
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -74,7 +74,8 @@ LINT= $($(MACH64)_LINT)
BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) \
$(PICS) -L $(ROOTLIBDIR64) $(LDLIBS)
-CCNEEDED = -lCrun
-# XX64 What to do about libstdc++ for g++ ???
+CCNEEDED = -lCrun
+$(__GNUC64)CCNEEDED = -L$(SFWLIBDIR) -R$(SFWLIBDIR) -lstdc++ \
+ -lgcc_s_$(MACH64)
BUILDCCC.SO= $(CCC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS) $(CCNEEDED)
diff --git a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c
index 0faf2fada0..6d59ccc853 100644
--- a/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c
+++ b/usr/src/cmd/picl/plugins/sun4u/cherrystone/psvcpolicy/psvcpolicy.c
@@ -56,8 +56,8 @@
/* Device paths for power supply hotplug handling */
#define SEG5_ADDR 0x30
#define EBUS_DEV_NAME "/devices/pci@9,700000/ebus@1/"
-#define SEG5_DEV_NAME EBUS_DEV_NAME ## "i2c@1,30/"
-#define SEG5_ADDR_DEV_FMT EBUS_DEV_NAME ## "i2c@1,%x:devctl"
+#define SEG5_DEV_NAME EBUS_DEV_NAME "i2c@1,30/"
+#define SEG5_ADDR_DEV_FMT EBUS_DEV_NAME "i2c@1,%x:devctl"
#define QLC_NODE "/pci@9,600000/SUNW,qlc@2"
diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c
index c722073547..5ffc4c7ee8 100644
--- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c
+++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c
@@ -77,11 +77,11 @@ static int dak_policy_debug = 0;
#endif
#define I2C_PATH "/devices/pci@9,700000/ebus@1/i2c@1,30"
-#define I2C_NODE I2C_PATH##":devctl"
-#define PCF8574 I2C_PATH##"/ioexp@0,%x:pcf8574"
-#define PCF8591 I2C_PATH##"/adio@0,%x:port_0"
-#define FRU I2C_PATH##"/fru@0,%x:fru"
-#define HPC3130_DEV I2C_PATH##"/hotplug-controller@0,%2x:port_%1x"
+#define I2C_NODE I2C_PATH ":devctl"
+#define PCF8574 I2C_PATH "/ioexp@0,%x:pcf8574"
+#define PCF8591 I2C_PATH "/adio@0,%x:port_0"
+#define FRU I2C_PATH "/fru@0,%x:fru"
+#define HPC3130_DEV I2C_PATH "/hotplug-controller@0,%2x:port_%1x"
#define GEN_FAULT_LED "FSP_GEN_FAULT_LED"
#define EMPTY_STRING "EMPTY"
#define DEVICE_FAILURE_MSG gettext("WARNING: Device %s failure detected")
diff --git a/usr/src/cmd/sf880drd/sf880drd.h b/usr/src/cmd/sf880drd/sf880drd.h
index 1ccf33bba3..fbeff818b7 100644
--- a/usr/src/cmd/sf880drd/sf880drd.h
+++ b/usr/src/cmd/sf880drd/sf880drd.h
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2000, 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -52,11 +52,11 @@ int dakdr_debug = 0;
* Device paths/names
*/
#define EBUS_DEV_NAME "/devices/pci@9,700000/ebus@1/"
-#define SEG5_DEV_NAME EBUS_DEV_NAME ## "i2c@1,30/"
+#define SEG5_DEV_NAME EBUS_DEV_NAME "i2c@1,30/"
-#define SSC050_LED_PORT SEG5_DEV_NAME ## "ioexp@0,82:port_4"
+#define SSC050_LED_PORT SEG5_DEV_NAME "ioexp@0,82:port_4"
-#define HPC3130_DEV_FMT SEG5_DEV_NAME ## "hotplug-controller@0,%2x:port_%1x"
+#define HPC3130_DEV_FMT SEG5_DEV_NAME "hotplug-controller@0,%2x:port_%1x"
/*
* Front panel leds (Cf. Daktari spec 7.2.5.7).
diff --git a/usr/src/head/inttypes.h b/usr/src/head/inttypes.h
index 4be889c3d2..e6137d6f93 100644
--- a/usr/src/head/inttypes.h
+++ b/usr/src/head/inttypes.h
@@ -55,7 +55,7 @@ extern "C" {
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/head/iso/stdlib_iso.h b/usr/src/head/iso/stdlib_iso.h
index 293cf10fea..2a636c59f3 100644
--- a/usr/src/head/iso/stdlib_iso.h
+++ b/usr/src/head/iso/stdlib_iso.h
@@ -97,7 +97,7 @@ typedef unsigned int size_t; /* (historical version) */
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/head/iso/wchar_iso.h b/usr/src/head/iso/wchar_iso.h
index 27e0b5988f..ab883c10e6 100644
--- a/usr/src/head/iso/wchar_iso.h
+++ b/usr/src/head/iso/wchar_iso.h
@@ -70,7 +70,7 @@ namespace std {
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/head/libintl.h b/usr/src/head/libintl.h
index 9c8ca23cf5..94b4d03153 100644
--- a/usr/src/head/libintl.h
+++ b/usr/src/head/libintl.h
@@ -40,7 +40,7 @@ extern "C" {
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/head/regex.h b/usr/src/head/regex.h
index 6c20c3a802..5402ef64cd 100644
--- a/usr/src/head/regex.h
+++ b/usr/src/head/regex.h
@@ -45,7 +45,7 @@ extern "C" {
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/head/rtld_db.h b/usr/src/head/rtld_db.h
index f3e7f9cacd..2d726730dc 100644
--- a/usr/src/head/rtld_db.h
+++ b/usr/src/head/rtld_db.h
@@ -20,8 +20,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _RTLD_DB_H
@@ -162,7 +162,7 @@ typedef struct rd_plt_info {
*/
#define RD_FLG_PI_PLTBOUND 0x0001 /* Indicates that the PLT */
/* has been bound - and that */
- /* pi_baddr will contain it's */
+ /* pi_baddr will contain its */
/* destination address */
struct ps_prochandle;
@@ -172,7 +172,7 @@ struct ps_prochandle;
*/
#ifdef __STDC__
extern void rd_delete(rd_agent_t *);
-extern char * rd_errstr(rd_err_e rderr);
+extern char *rd_errstr(rd_err_e rderr);
extern rd_err_e rd_event_addr(rd_agent_t *, rd_event_e, rd_notify_t *);
extern rd_err_e rd_event_enable(rd_agent_t *, int);
extern rd_err_e rd_event_getmsg(rd_agent_t *, rd_event_msg_t *);
@@ -180,21 +180,21 @@ extern rd_err_e rd_init(int);
extern rd_err_e rd_loadobj_iter(rd_agent_t *, rl_iter_f *,
void *);
extern void rd_log(const int);
-extern rd_agent_t * rd_new(struct ps_prochandle *);
+extern rd_agent_t *rd_new(struct ps_prochandle *);
extern rd_err_e rd_objpad_enable(struct rd_agent *, size_t);
extern rd_err_e rd_plt_resolution(rd_agent_t *, psaddr_t, lwpid_t,
psaddr_t, rd_plt_info_t *);
extern rd_err_e rd_reset(struct rd_agent *);
#else
extern void rd_delete();
-extern char * rd_errstr();
+extern char *rd_errstr();
extern rd_err_e rd_event_addr();
extern rd_err_e rd_event_enable();
extern rd_err_e rd_event_getmsg();
extern rd_err_e rd_init();
extern rd_err_e rd_loadobj_iter();
extern void rd_log();
-extern rd_agent_t * rd_new();
+extern rd_agent_t *rd_new();
extern rd_err_e rd_objpad_enable();
extern rd_err_e rd_plt_resolution();
extern rd_err_e rd_reset();
diff --git a/usr/src/head/stddef.h b/usr/src/head/stddef.h
index 15a4ba0f6b..1e3d016048 100644
--- a/usr/src/head/stddef.h
+++ b/usr/src/head/stddef.h
@@ -52,7 +52,7 @@ extern "C" {
/*
* wchar_t is a built-in type in standard C++ and as such is not
* defined here when using standard C++. However, the GNU compiler
- * fixincludes utility nonetheless creates it's own version of this
+ * fixincludes utility nonetheless creates its own version of this
* header for use by gcc and g++. In that version it adds a redundant
* guard for __cplusplus. To avoid the creation of a gcc/g++ specific
* header we need to include the following magic comment:
diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c
index 753acf28a7..def1e52f6f 100644
--- a/usr/src/tools/cw/cw.c
+++ b/usr/src/tools/cw/cw.c
@@ -91,6 +91,7 @@
* -R<dir[:dir]> Build runtime search path list into executable
* -S Compile and only generate assembly code (.s)
* -s Strip symbol table from the executable file
+ * -t Turn off duplicate symbol warnings when linking
* -U<name> Delete initial definition of preprocessor symbol <name>
* -V Report version number of each compilation phase
* -v Do stricter semantic checking
@@ -215,6 +216,7 @@
* -R<dir[:dir]> pass-thru
* -S pass-thru
* -s -Wl,-s
+ * -t -Wl,-t
* -U<name> pass-thru
* -V --version
* -v -Wall
@@ -237,7 +239,7 @@
* -xchar_byte_order=<o> error
* -xchip=<c> table
* -xcode=<c> table
- * -xcrossfile[=<n>] error
+ * -xcrossfile[=<n>] ignore
* -xe error
* -xF error
* -xhelp=<f> error
@@ -827,6 +829,13 @@ do_gcc(const char *dir, const char *cmd, int argc, char **argv,
}
error(arg);
break;
+ case 't':
+ if (arglen == 1) {
+ newae(h, "-Wl,-t");
+ break;
+ }
+ error(arg);
+ break;
case 'V':
if (arglen == 1) {
echo = 0;
@@ -1003,6 +1012,8 @@ do_gcc(const char *dir, const char *cmd, int argc, char **argv,
}
if (strncmp(arg, "-xcache=", 8) == 0)
break;
+ if (strncmp(arg, "-xcrossfile", 11) == 0)
+ break;
error(arg);
break;
case 'd':
diff --git a/usr/src/uts/sun4u/sys/wrsm_config.h b/usr/src/uts/sun4u/sys/wrsm_config.h
index 7377a06e97..31c9121233 100644
--- a/usr/src/uts/sun4u/sys/wrsm_config.h
+++ b/usr/src/uts/sun4u/sys/wrsm_config.h
@@ -20,8 +20,8 @@
* CDDL HEADER END
*/
/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
*/
#ifndef _WRSM_CONFIG_H
@@ -47,7 +47,7 @@ extern "C" {
#else
#define WRSM_ALIGN_64(t, n) union { struct {uint32_t pad; t n; } val; \
uint64_t align; } u_##n
-#define WRSM_ALIGN_PTR(n) u_##n.val.##n
+#define WRSM_ALIGN_PTR(n) u_##n.val.n
#endif
/*
* If any of the data structures in this file are changed,
diff --git a/usr/src/uts/sun4u/sys/zulumod.h b/usr/src/uts/sun4u/sys/zulumod.h
index 9baf9f9982..0ffd5f5c82 100644
--- a/usr/src/uts/sun4u/sys/zulumod.h
+++ b/usr/src/uts/sun4u/sys/zulumod.h
@@ -20,12 +20,12 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#ifndef __ZULUMOD_INCL__
-#define __ZULUMOD_INCL__
+#ifndef _ZULUMOD_H
+#define _ZULUMOD_H
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -44,7 +44,7 @@ extern "C" {
#define ZULUVM_VERSION_STR(a) #a
#define ZULUVM_VERSION(a) ZULUVM_VERSION_STR(a)
#define ZULUVM_MOD_VERSION \
- ZULUVM_VERSION(XHAT_PROVIDER_VERSION) ## "." ## \
+ ZULUVM_VERSION(XHAT_PROVIDER_VERSION) "." \
ZULUVM_VERSION(ZULUVM_INTERFACE_VERSION)
#define ZULUDCHKFUNC(_p1, _p2, _p3) \
@@ -260,4 +260,4 @@ void zuluvm_load_tte(struct zulu_hat *zhat, caddr_t addr, uint64_t pfn,
}
#endif
-#endif /* __ZULUMOD_INCL__ */
+#endif /* _ZULUMOD_H */