|
|
Heads up: ON transitioning to the Sun Studio 12 compiler.Date: Wed, 06 Aug 2008 17:19:57 +0100 From: Nick Todd - Sun Microsystems <Nick.Todd at sun dot com> To: on-all at sun dot com, onnv-gate at onnv dot eng dot sun dot com, s11-cbe at sun dot com Subject: Heads up: ON transitioning to the Sun Studio 12 compiler. Executive summary: ON will be moving to the Sun Studio 12 compiler in build 99. The new compiler uses different options to specify machine architecture and provides a much more rigorous lint process. If you are integrating into ON you will need to do the following: 1. Let me know if you are introducing any new Makefiles that explicitly use the -xarch option. I'll change those Makefiles as part of the fix for 6659940 "ON makefiles use wrong options for Sun Studio 12 compiler and lint." 2. Run the SS12 version of lint against any changes that you integrate. You can do this by an explicit 'make lint' in the relevant directory or as part of a nightly build. The SS12 compiler and lint are available from /ws/onnv-tools/SUNWspro/SS12. As this project is still a work in progress you may see the following warnings cc: Warning: -xarch=amd64 is deprecated, use -m64 to create 64-bit programs lint: Warning: -Xarch=amd64 is deprecated, use -m64 instead or similar when you compile or run lint which will be fixed when ON switches compilers. You will also see lint warnings like this: "/share/bld/u/nickto/ss12-nousb/ws/usr/closed/uts/intel/io/dktp/hba/ncrs/ncrs.c", line 2687: warning: function argument type inconsistent with format: prom_printf(arg 2) struct glm_scsi_cmd * and (format) void * in /share/bld/u/nickto/ss12-nousb/ws/usr/closed/uts/intel/io/dktp/hba/ncrs/ncrs.c(2687) (E_BAD_FORMAT_ARG_TYPE2) You will need to check that files you've changed don't appear in the lint output and if you're touching any of the files I'm working on we probably need to talk. That list of files can be found in the webrev for CR 6733185. Types of lint errors -------------------- Most of the lint warnings I've seen while converting ON to work with SS12 are caused by using %p in the format string and passing a pointer which isn't of type (void *). These warnings get the tag E_BAD_FORMAT_ARG_TYPE2. As a printf takes a variable argument list the number of acceptable data types it accepts is fairly limited and SS12 lint now enforces that restriction. The other lint warning I've seen has the tag E_INCONS_ARG_DECL2. Fixing these warnings can be more problematic as lint is often reporting a problem between the version of a structure in the kernel lint libraries and the version used locally. We probably need to talk about these instances. NB: Please don't use /*LINTED*/ to get around these warnings as the directive can hide other possible problems. -- Nick |