Robert M. Muench | 1 Aug 2000 20:19
Picon
Favicon

RE: How to: Link libraries?

> -----Original Message-----
> From: jamming-admin <at> perforce.com
> [mailto:jamming-admin <at> perforce.com]On
> Behalf Of Dave Hylands
> Sent: Thursday, July 27, 2000 10:44 PM
> To: 'robert.muench <at> robertmuench.de'; Dave Hylands
> Cc: Jamming
> Subject: RE: [jamming] How to: Link libraries?

> I created a little test to see if I could get this work and
> got it working. I made my top most jamfile look like:
> ...

Hi, I now tried your solution. It's getting me closer. However, now I
have the problem, that the command line for the linker is too long :-|
Is there an easy way to let Jam split it up and call the linker
command several times, or to redirect the content to a file?

Robert M. Muench, Karlsruhe, Germany
       ==> please use PGP <==

  When do you want to reboot today?

    use the free portable GUI lib
  OpenAmulet http://www.openip.org

Donald Sharp | 1 Aug 2000 20:44
Picon
Favicon

Re: How to: Link libraries?

look at the actions piecemeal modifier.

http://public.perforce.com/public/jam/src/Jamlang.html

It's under Rules/Action Modifiers.  

donald
On Tue, Aug 01, 2000 at 08:19:06PM +0200, Robert M. Muench wrote:
> > -----Original Message-----
> > From: jamming-admin <at> perforce.com
> > [mailto:jamming-admin <at> perforce.com]On
> > Behalf Of Dave Hylands
> > Sent: Thursday, July 27, 2000 10:44 PM
> > To: 'robert.muench <at> robertmuench.de'; Dave Hylands
> > Cc: Jamming
> > Subject: RE: [jamming] How to: Link libraries?
> 
> > I created a little test to see if I could get this work and
> > got it working. I made my top most jamfile look like:
> > ...
> 
> Hi, I now tried your solution. It's getting me closer. However, now I
> have the problem, that the command line for the linker is too long :-|
> Is there an easy way to let Jam split it up and call the linker
> command several times, or to redirect the content to a file?
> 
> Robert M. Muench, Karlsruhe, Germany
>        ==> please use PGP <==
> 
>   When do you want to reboot today?
(Continue reading)

Dave Hylands | 1 Aug 2000 20:52
Favicon

RE: How to: Link libraries?

Hi Robert,

> > I created a little test to see if I could get this work and
> > got it working. I made my top most jamfile look like:
> > ...
> 
> Hi, I now tried your solution. It's getting me closer. However, now I
> have the problem, that the command line for the linker is too long :-|
> Is there an easy way to let Jam split it up and call the linker
> command several times, or to redirect the content to a file?

Unfortunately, the linker doesn't really lend itself to running mulitple
times (i.e. using the piecemeal option), and jam doesn't seem to support the
notion of "response" files (maybe I'm missing something). One approach would
be to merge several libraries into a bigger library and pass that on the
command line (thus reducing the size of the command line). If you're feeding
raw objects, creating libraries is probably the easiest way to go.

Another approach is to rewrite the Link rule/action to do something like:

rule Link
{
    MODE on $(<) = $(EXEMODE) ;
    Chmod $(<) ;

    local i ;
    StartLink $(<) : $(>) ;
    for i in $(>)
    {
        LinkItem $(<) : $(i) ;
(Continue reading)

Robert M. Muench | 2 Aug 2000 09:38
Picon
Favicon

RE: How to: Link libraries?

> -----Original Message-----
> From: Donald Sharp [mailto:sharpd <at> cisco.com]
> Sent: Tuesday, August 01, 2000 8:44 PM
> To: Robert M. Muench
> Cc: Dave Hylands; Jamming
> Subject: Re: [jamming] How to: Link libraries?

> look at the actions piecemeal modifier.

Hi, I did but either I don't get it or it's not working as expected. I
have a rule like Dave suggested it, collecting all OBJ files in a
variable. Than I added:

actions piecemeal OAObjects
{
}

In the hope that the rule will be used until a 'shell-buffer-overrun'
is approaching and that Jam continues normal processing and later
returns to where it left to continue the build process. But this
failed :-(

I expect that I have to add the link command inside the 'piecmeal'
scope, right?

Robert M. Muench, Karlsruhe, Germany
       ==> please use PGP <==

  When do you want to reboot today?

(Continue reading)

Donald Sharp | 2 Aug 2000 14:29
Picon
Favicon

Re: How to: Link libraries?

That sounds right.  I would have put the piecemeal 
subcommand under the Link action.

donald
On Wed, Aug 02, 2000 at 09:38:04AM +0200, Robert M. Muench wrote:
> > -----Original Message-----
> > From: Donald Sharp [mailto:sharpd <at> cisco.com]
> > Sent: Tuesday, August 01, 2000 8:44 PM
> > To: Robert M. Muench
> > Cc: Dave Hylands; Jamming
> > Subject: Re: [jamming] How to: Link libraries?
> 
> > look at the actions piecemeal modifier.
> 
> Hi, I did but either I don't get it or it's not working as expected. I
> have a rule like Dave suggested it, collecting all OBJ files in a
> variable. Than I added:
> 
> actions piecemeal OAObjects
> {
> }
> 
> In the hope that the rule will be used until a 'shell-buffer-overrun'
> is approaching and that Jam continues normal processing and later
> returns to where it left to continue the build process. But this
> failed :-(
> 
> I expect that I have to add the link command inside the 'piecmeal'
> scope, right?
> 
(Continue reading)

Greg Loucks | 2 Aug 2000 19:14
Picon

multiple target platforms?

I would like to be able to use a single run of Jam to build multiple targets for an embedded system (pSOS+). I
have projects that have targets that can be built for:
1. simulation environment (an addin to Visual Studio)
2. evaluation board (my target processor with distinct Board Support Package)
3. final hardware (my hardware and my BSP)
4. host OS, Windows NT (for source generation executables)

And, if that weren't enough, I also require the ability to build some tools for the above target platforms
_and_ Windows CE:
5. WinCE simulation environment
6. WinCE CEPC target platform (like an Eval Board)
7. WinCE on target device (different CPU, different BSP)

Has anyone come across this issue before?

I've fiddled a little bit with the code and came up with a hardware "grist" that I can add to every file which
specifies the target system, os, config etc. Then I have a target-system-related action for every
environment. It seems pretty hokey to me.

E.g.
a Jamfile
=========
P1 = d.estp.pp ;		# d for debug; estp is the eval board; pp is pRISM+ environ
P2 = d.wipc.ps ;		# d for debug; wipc is wintel pc; ps is pSOSim
P3 = r.mybd.pp ;		# d for release; mybd is my board; pp is pRISM+

S = exception.cpp object.cpp task.cpp queue.cpp mutex.cpp semaphore.cpp ;

LINKFLAGS$(P1:S) += -e _START ram-estp.dld ;
LINKFLAGS$(P3:S) += -e _START ram-mybd.dld ;
(Continue reading)

Diane Holt | 2 Aug 2000 21:53
Picon
Favicon

RE: How to: Link libraries?

Robert,

Have you tried just cranking up the value for MAXLINE in jam.h? I have it
set to 32768 on an NT and've never had a problem (w.r.t. too-long lines
anyway).

Diane

--- "Robert M. Muench" <robert.muench <at> robertmuench.de> wrote:
> > -----Original Message-----
> > From: Donald Sharp [mailto:sharpd <at> cisco.com]
> > Sent: Tuesday, August 01, 2000 8:44 PM
> > To: Robert M. Muench
> > Cc: Dave Hylands; Jamming
> > Subject: Re: [jamming] How to: Link libraries?
> 
> > look at the actions piecemeal modifier.
> 
> Hi, I did but either I don't get it or it's not working as expected. I
> have a rule like Dave suggested it, collecting all OBJ files in a
> variable. Than I added:
> 
> actions piecemeal OAObjects
> {
> }
> 
> In the hope that the rule will be used until a 'shell-buffer-overrun'
> is approaching and that Jam continues normal processing and later
> returns to where it left to continue the build process. But this
> failed :-(
(Continue reading)

David Funk | 3 Aug 2000 08:07
Picon

Making non-unique target names fails

Hi,

I'm using the latest jam sources from http://www.perforce.com/jam/jam.html
(version 2.2.1), compiled for FreeBSD 4.0.

In real life, I have a project that contains multiple libraries in
subdirectories, with each generating its own host test file to do unit
tests.  I've simplified this in the following test setup:

                 /tmp
                   |
                jamtest   ------- Jamfile here is:
                  /\                  SubInclude TOP sub1 ;
                 /  \                 SubInclude TOP sub2 ;
                /    \
               /      \
       +---  sub1    sub2 ------- Jamfile here is:
       |                             SubDir TOP sub2 ;
       |                             Main hosttest : hosttest.c ;
       |
       +------------------------- Jamfile here is:
                                     SubDir TOP sub1 ;
                                     Main hosttest : hosttest.c ;

TOP is set to  /tmp/jamtest.  I have an empty /tmp/jamtest/Jamrules.

Running jam gives me:

1   	$ jam -d2
2   	...found 17 target(s)...
(Continue reading)

Robert M. Muench | 4 Aug 2000 12:28
Picon
Favicon

RE: How to: Link libraries?

> -----Original Message-----
> From: Diane Holt [mailto:holtdl <at> yahoo.com]
> Sent: Wednesday, August 02, 2000 9:53 PM
> To: robert.muench <at> robertmuench.de
> Cc: Jamming
> Subject: RE: [jamming] How to: Link libraries?

> Have you tried just cranking up the value for MAXLINE in
> jam.h? I have it set to 32768 on an NT and've never had a problem
> (w.r.t. too-long lines anyway).

Hi Diane, that's a good tip. I changed it but now I have the problem,
that the shell states: command line to long. How have you changed the
limit of the command line length in NT? Robert

Dave Hylands | 6 Aug 2000 20:11
Favicon

RE: Making non-unique target names fails

Hi David,

> However, line 16 links sub1/hosttest.o into sub2/hosttest instead of
> sub1/hosttest. Then line 24 links sub2/hosttest.o into sub2/hosttest,
> overwriting the previous link.  sub1/hosttest is never made.

I recreated your little example, and then did the following:

jam -d6 | grep DEPENDS

I got the following output (note that I did this under NT, which is why the
extensions are a little different than what your exact example would
produce):

>> DEPENDS all  : shell files lib exe obj
>> DEPENDS all shell files lib exe obj  : first
>>>>|>>>>| DEPENDS hosttest  : hosttest.exe
>>>>|>>>>| DEPENDS exe  : hosttest.exe
>>>>|>>>>| DEPENDS hosttest.exe  : <sub1>hosttest1.obj
>>>>|>>>>|>>>> DEPENDS <sub1>hosttest1.obj  : <sub1>hosttest1.c
>>>>|>>>>| DEPENDS obj  : <sub1>hosttest1.obj
>>>>|>>>>| DEPENDS hosttest  : hosttest.exe
>>>>|>>>>| DEPENDS exe  : hosttest.exe
>>>>|>>>>| DEPENDS hosttest.exe  : <sub2>hosttest2.obj
>>>>|>>>>|>>>> DEPENDS <sub2>hosttest2.obj  : <sub2>hosttest2.c
>>>>|>>>>| DEPENDS obj  : <sub2>hosttest2.obj

In particular notice the two lines:
>>>>|>>>>| DEPENDS hosttest.exe  : <sub1>hosttest1.obj
>>>>|>>>>| DEPENDS hosttest.exe  : <sub2>hosttest2.obj
(Continue reading)


Gmane