tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Shared objects renaming patch .so -> .pico



Hi,

To avoid conflicts between shared objects and final library names
libXX.so, it has been suggested to make objects use the .pico
extension instead of .so currently.

Here follow a patch against bsd.lib.mk which does so, for review and
tests.

I already tested some archs and `build.sh release' does not show any
problem for alpha, amd64 and i386; and some other ones are in
progress.  I then booted amd64 and i386 install cdroms (under qemu),
and updated my amd64 workstation ... no glitch so far.

Comments ?

NB: For now, i only changed the file extension from .so to .pico, not
the related SOBJS variable which can be changed to PICOBJS too.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.
Index: share/mk/bsd.README
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.README,v
retrieving revision 1.264
diff -u -p -r1.264 bsd.README
--- share/mk/bsd.README 3 Feb 2010 15:34:44 -0000       1.264
+++ share/mk/bsd.README 17 Feb 2010 22:19:23 -0000
@@ -56,7 +56,7 @@ the tree where the file gets installed.
 
 The profiled libraries are no longer built in a different directory than
 the regular libraries.  A new suffix, ".po", is used to denote a profiled
-object, and ".so" denotes a shared (position-independent) object.
+object, and ".pico" denotes a shared (position-independent) object.
 
 There are various make variables used during the build.
 
Index: share/mk/bsd.lib.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.lib.mk,v
retrieving revision 1.303
diff -u -p -r1.303 bsd.lib.mk
--- share/mk/bsd.lib.mk 25 Jan 2010 00:43:00 -0000      1.303
+++ share/mk/bsd.lib.mk 17 Feb 2010 22:19:23 -0000
@@ -61,7 +61,7 @@ DPADD+=               ${LIBDO.${_lib}}/lib${_lib}.so
 .endif                                                                 # }
 
 ##### Build and install rules
-MKDEP_SUFFIXES?=       .o .po .so .go .ln
+MKDEP_SUFFIXES?=       .o .po .pico .go .ln
 
 # Use purely kernel private headers in rump builds
 .if !defined(RUMPKERNEL)
@@ -130,8 +130,8 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR}
 
 # add additional suffixes not exported.
 # .po is used for profiling object files.
-# .so is used for PIC object files.
-.SUFFIXES: .out .a .ln .so .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r .y 
.l .cl .p .h
+# .pico is used for PIC object files.
+.SUFFIXES: .out .a .ln .pico .po .go .o .s .S .c .cc .cpp .cxx .C .m .F .f .r 
.y .l .cl .p .h
 .SUFFIXES: .sh .m4 .m
 
 
@@ -151,14 +151,14 @@ SHLIB_FULLVERSION=${SHLIB_MAJOR}
 #                      with ELF, also set shared-lib version for ld.so.
 # SHLIB_LDSTARTFILE:   support .o file, call C++ file-level constructors
 # SHLIB_LDENDFILE:     support .o file, call C++ file-level destructors
-# FPICFLAGS:           flags for ${FC} to compile .[fF] files to .so objects.
+# FPICFLAGS:           flags for ${FC} to compile .[fF] files to .pico objects.
 # CPPPICFLAGS:         flags for ${CPP} to preprocess .[sS] files for ${AS}
 # CPICFLAGS:           flags for ${CC} to compile .[cC] files to pic objects.
-# CSHLIBFLAGS:         flags for ${CC} to compile .[cC] files to .so objects.
+# CSHLIBFLAGS:         flags for ${CC} to compile .[cC] files to .pico objects.
 #                      (usually includes ${CPICFLAGS})
 # CAPICFLAGS:          flags for ${CC} to compiling .[Ss] files
 #                      (usually just ${CPPPICFLAGS} ${CPICFLAGS})
-# APICFLAGS:           flags for ${AS} to assemble .[sS] to .so objects.
+# APICFLAGS:           flags for ${AS} to assemble .[sS] to .pico objects.
 
 .if ${MACHINE_ARCH} == "alpha"                                         # {
 
@@ -234,7 +234,7 @@ FFLAGS+=    ${FOPTS}
        ${_MKTARGET_COMPILE}
        ${COMPILE.c} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
 
-.c.so:
+.c.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} 
${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
@@ -259,7 +259,7 @@ FFLAGS+=    ${FOPTS}
        ${_MKTARGET_COMPILE}
        ${COMPILE.cc} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} -g ${.IMPSRC} -o ${.TARGET}
 
-.cc.so .cpp.so .cxx.so .C.so:
+.cc.pico .cpp.pico .cxx.pico .C.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.cc} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} 
${CPPFLAGS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(CFLAGS) || empty(CFLAGS:M*-g*)
@@ -284,7 +284,7 @@ FFLAGS+=    ${FOPTS}
        ${_MKTARGET_COMPILE}
        ${COMPILE.f} ${DEBUGFLAGS} -g ${.IMPSRC} -o ${.TARGET}
 
-.f.so:
+.f.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.f} ${FPICFLAGS} ${.IMPSRC} -o ${.TARGET}
 .if !defined(FOPTS) || empty(FOPTS:M*-g*)
@@ -316,7 +316,7 @@ FFLAGS+=    ${FOPTS}
        ${OBJCOPY} -X ${.TARGET}
 .endif
 
-.m.so:
+.m.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.m} ${CSHLIBFLAGS} ${OBJCOPTS.${.IMPSRC:T}} ${.IMPSRC} -o 
${.TARGET}
 .if !defined(OBJCFLAGS) || empty(OBJCFLAGS:M*-g*)
@@ -351,12 +351,12 @@ FFLAGS+=  ${FOPTS}
        ${_MKTARGET_COMPILE}
        ${COMPILE.S} ${DEBUGFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
 
-.s.so:
+.s.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.s} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
        ${OBJCOPY} -x ${.TARGET}
 
-.S.so:
+.S.pico:
        ${_MKTARGET_COMPILE}
        ${COMPILE.S} ${CAPICFLAGS} ${COPTS.${.IMPSRC:T}} 
${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
        ${OBJCOPY} -x ${.TARGET}
@@ -399,14 +399,14 @@ PROFFLAGS?=-DGPROF -DPROF
 # since it's needed for making shared lib.
 # but don't install it.
 SOLIB=lib${LIB}_pic.a
-SOBJS+=${OBJS:.o=.so}
+SOBJS+=${OBJS:.o=.pico}
 .else
 SOLIB=lib${LIB}.a
 .endif
 .else
 SOLIB=lib${LIB}_pic.a
 _LIBS+=${SOLIB}
-SOBJS+=${OBJS:.o=.so}
+SOBJS+=${OBJS:.o=.pico}
 .endif
 .if defined(SHLIB_FULLVERSION)
 _LIBS+=lib${LIB}.so.${SHLIB_FULLVERSION}


Home | Main Index | Thread Index | Old Index