RE: [boost] Re: changing aCC-Link-action

I have attached the updated acc-tools.jam file located in boost_1_31_0/tools/build/v1. I added the following option to the compile line: +z - to make the compiler generate PIC (position independent code) -- required for shared libraries. -w - suppresses warning messages And to the link line: -b - to tell the linker to generate a shared library instead of an executable. I'm assuming that aCC-Link-action is only used for generating shared library? Do you happen to know which thread functions where missing? -Jerry -----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of David Abrahams Sent: Tuesday, May 11, 2004 1:50 PM To: boost@lists.boost.org Subject: [boost] Re: changing aCC-Link-action "DY, JERRY U (SBCSI)" <jd2419@sbc.com> writes:
I would like to add options to the compile and link line used for building the threads library. I have added as follows but not sure if it's the proper place for it. With these changes, I'm able to cleanly compile and build the threads shared lib using aC++ 3.55 compiler. Credit to the HP aC++ team for their help on hpux.hpp changes.
boost_1_31_0/tools/build/v1/acc-tools.jam:105 $(acc.bin-directory)$(CXX) -AA -mt +z -w -c +W823 -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDR S)" -I"$(STDHDRS)" -o "$(<)" "$(>)"
boost_1_31_0/tools/build/v1/acc-tools.jam:82 $(acc.bin-directory)$(CXX) $(LINKFLAGS) -AA -mt -b -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS)
boost_1_31_0/boost/config/platform/hpux.hpp:63 #define BOOST_HAS_PTHREADS
Hi Jerry, Thanks for the info. I don't think we want to define BOOST_HAS_PTHREADS unconditionally, because IIRC at least some versions of HPUX's headers don't contain one or two of the functions used by Boost.Threads It's more effective to post a patch as an attachment, so there's no ambiguity about how mailers have mangled it, and so it can be automatically applied. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I have attached the updated acc-tools.jam file located in boost_1_31_0/tools/build/v1.
+z - to make the compiler generate PIC (position independent code) -- required for shared libraries.
That should be conditional on us actually building a shared library - we build static ones as well, not to mention executables.
-w - suppresses warning messages
What all of them?
And to the link line:
-b - to tell the linker to generate a shared library instead of an executable. I'm assuming that aCC-Link-action is only used for generating shared library?
Again we need to make this conditional on us actually building a shared lib, Rene, Dave, how does one do that? Thanks, for persisting with this, John.

John Maddock wrote:
I have attached the updated acc-tools.jam file located in boost_1_31_0/tools/build/v1.
+z - to make the compiler generate PIC (position independent code) -- required for shared libraries.
That should be conditional on us actually building a shared library - we build static ones as well, not to mention executables.
flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ;
-w - suppresses warning messages
What all of them?
If it is all of them it should be: flags acc CFLAGS <warnings>off : -w ;
And to the link line:
-b - to tell the linker to generate a shared library instead of an executable. I'm assuming that aCC-Link-action is only used for generating shared library?
No it's used to link everything except library archives.
Again we need to make this conditional on us actually building a shared lib, Rene, Dave, how does one do that?
flags acc LINKFLAGS <target-types>$(SHARED_TYPES) : -b ; -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Rene Rivera wrote:
flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ; flags acc LINKFLAGS <target-types>$(SHARED_TYPES) : -b ;
Oops :-) That should be "target-type", singular not plural. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Rene Rivera <grafik.list@redshift-software.com> writes: > John Maddock wrote: > >>>I have attached the updated acc-tools.jam file located in >>>boost_1_31_0/tools/build/v1. >> >>>+z - to make the compiler generate PIC (position independent code) -- >>>required for shared libraries. >> That should be conditional on us actually building a shared library >> - we >> build static ones as well, not to mention executables. > > flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ; If that works, great. Normally I've handled that sort of thing inside Link-action. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams wrote:
Rene Rivera <grafik.list@redshift-software.com> writes:
John Maddock wrote:
I have attached the updated acc-tools.jam file located in boost_1_31_0/tools/build/v1.
+z - to make the compiler generate PIC (position independent code) -- required for shared libraries.
That should be conditional on us actually building a shared library - we build static ones as well, not to mention executables.
flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ;
If that works, great. Normally I've handled that sort of thing inside Link-action.
It works ;-) But the reason I posted it that way is because it's easier to understand for non-jam knowing people than trying to describe how to change the link action. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

Rene Rivera <grafik.list@redshift-software.com> writes:
flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ; ^ If that works, great. Normally I've handled that sort of thing inside Link-action.
It works ;-) But the reason I posted it that way is because it's easier to understand for non-jam knowing people than trying to describe how to change the link action.
OK, are you sure about that 's' noted above? -- Dave Abrahams Boost Consulting http://www.boost-consulting.com

David Abrahams wrote:
Rene Rivera <grafik.list@redshift-software.com> writes:
flags acc CFLAGS <target-types>$(SHARED_TYPES) : +z ;
^
If that works, great. Normally I've handled that sort of thing inside Link-action.
It works ;-) But the reason I posted it that way is because it's easier to understand for non-jam knowing people than trying to describe how to change the link action.
OK, are you sure about that 's' noted above?
Ah I see... Yes and no ;-) I already, previously, corrected myself on that one. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
participants (4)
-
David Abrahams
-
DY, JERRY U (SBCSI)
-
John Maddock
-
Rene Rivera