* GDB make error: for m68xx toolchain @ 2008-04-04 2:43 Nathan K 2008-04-04 9:35 ` Michael Snyder 0 siblings, 1 reply; 5+ messages in thread From: Nathan K @ 2008-04-04 2:43 UTC (permalink / raw) To: gdb Hi people who have more of an idea about this than me, For Uni we have to compile for the m68hc11. So I've set about setting up the toolchain so I can work at home as indicated here. My problem is a make error when compiling GDB make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop. make: *** [all-gdb] Error 2 I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as indicated on GCC 68HC11 & 68HC12 Sources Installation I think this might be referring to the math library, but I'm not sure what to do about it. perhaps add a config option or edit make file??? Thanks in advance for any pointers, Nathan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB make error: for m68xx toolchain 2008-04-04 2:43 GDB make error: for m68xx toolchain Nathan K @ 2008-04-04 9:35 ` Michael Snyder 2008-04-04 11:18 ` No.Spam 0 siblings, 1 reply; 5+ messages in thread From: Michael Snyder @ 2008-04-04 9:35 UTC (permalink / raw) To: me; +Cc: gdb On Fri, 2008-04-04 at 12:21 +1000, Nathan K wrote: > Hi people who have more of an idea about this than me, > > For Uni we have to compile for the m68hc11. So I've set about setting up > the toolchain so I can work at home as indicated here. > > My problem is a make error when compiling GDB > > make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop. > make: *** [all-gdb] Error 2 > > I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as > indicated on GCC 68HC11 & 68HC12 Sources Installation > > I think this might be referring to the math library, but I'm not sure what > to do about it. perhaps add a config option or edit make file??? > > Thanks in advance for any pointers, > > Nathan What's Uni? Oh, university? Heh, you're not at an .edu address... Yes, the error message refers to the math library. "-lm" means "link with libm.a" (or libm.so, depending). But the -lm directive seems to be misplaced somehow, perhaps from your host/target makefile fragment. We're at version 6.8, though -- we can't help you too much with version 6.2... ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB make error: for m68xx toolchain 2008-04-04 9:35 ` Michael Snyder @ 2008-04-04 11:18 ` No.Spam 2008-04-05 3:58 ` Michael Snyder 0 siblings, 1 reply; 5+ messages in thread From: No.Spam @ 2008-04-04 11:18 UTC (permalink / raw) To: gdb Michael Snyder wrote: > On Fri, 2008-04-04 at 12:21 +1000, Nathan K wrote: > >> Hi people who have more of an idea about this than me, >> >> For Uni we have to compile for the m68hc11. So I've set about setting up >> the toolchain so I can work at home as indicated here. >> >> My problem is a make error when compiling GDB >> >> make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop. >> make: *** [all-gdb] Error 2 >> >> I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as >> indicated on GCC 68HC11 & 68HC12 Sources Installation >> >> I think this might be referring to the math library, but I'm not sure what >> to do about it. perhaps add a config option or edit make file??? >> >> Thanks in advance for any pointers, >> >> Nathan >> > > What's Uni? Oh, university? Heh, you're not at an .edu address... > > Yes, the error message refers to the math library. > "-lm" means "link with libm.a" (or libm.so, depending). > But the -lm directive seems to be misplaced somehow, > perhaps from your host/target makefile fragment. > > We're at version 6.8, though -- we can't help you too much > with version 6.2... > > > > Thanks for your response, yeah I use a dumb email address for lists to avoid spam. Could I just go into the Makefile and add the flag? or is it a configure option? Where would this directive normally be? I'd be happy to change to 6.8 but since I'm using it for cross compiling I need to ensure that it will work with the m68hc11.... also this is my first experience setting up a toolchain, so I'm trying to be conservative with what I try (since i'm not sure about what might work and don't want to get in over my head). If anyone know of a toolchain that works with a newer version of GDB please let me know. Thanks again, Nathan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB make error: for m68xx toolchain 2008-04-04 11:18 ` No.Spam @ 2008-04-05 3:58 ` Michael Snyder 2008-04-07 11:34 ` No.Spam 0 siblings, 1 reply; 5+ messages in thread From: Michael Snyder @ 2008-04-05 3:58 UTC (permalink / raw) To: No.Spam; +Cc: gdb On Fri, 2008-04-04 at 12:42 +1000, No.Spam wrote: > Michael Snyder wrote: > > On Fri, 2008-04-04 at 12:21 +1000, Nathan K wrote: > > > >> Hi people who have more of an idea about this than me, > >> > >> For Uni we have to compile for the m68hc11. So I've set about setting up > >> the toolchain so I can work at home as indicated here. > >> > >> My problem is a make error when compiling GDB > >> > >> make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop. > >> make: *** [all-gdb] Error 2 > >> > >> I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as > >> indicated on GCC 68HC11 & 68HC12 Sources Installation > >> > >> I think this might be referring to the math library, but I'm not sure what > >> to do about it. perhaps add a config option or edit make file??? > >> > >> Thanks in advance for any pointers, > >> > >> Nathan > >> > > > > What's Uni? Oh, university? Heh, you're not at an .edu address... > > > > Yes, the error message refers to the math library. > > "-lm" means "link with libm.a" (or libm.so, depending). > > But the -lm directive seems to be misplaced somehow, > > perhaps from your host/target makefile fragment. > > > > We're at version 6.8, though -- we can't help you too much > > with version 6.2... > > > > > > > > > Thanks for your response, yeah I use a dumb email address for lists to > avoid spam. > > Could I just go into the Makefile and add the flag? or is it a configure > option? Where would this directive normally be? > > I'd be happy to change to 6.8 but since I'm using it for cross compiling > I need to ensure that it will work with the m68hc11.... also this is my > first experience setting up a toolchain, so I'm trying to be > conservative with what I try (since i'm not sure about what might work > and don't want to get in over my head). > > If anyone know of a toolchain that works with a newer version of GDB > please let me know. The version numbers (6.2 and 6.8) are gdb versions, not toolchain. When people talk about a toolchain version, they're usually referring to the gcc version number. I don't think that's an issue here. The issue is that gdb version 6.2 was a long time ago (2004, actually), and the sources that we work with have changed a lot since then. We don't generally like to go back in time and help people work with old versions of the sources -- the general practice is to say "update to the latest release of gdb, then if you still have problems we'll help you". So not to go against precedent, but... I see that in the source version you are using (6.2), there is a file in the source tree, "gdb/config/m68hc11/m68hc11.mt" That file is called a "target makefile fragment", and it winds up as part of your makefile. And it contains a line that looks like this: SIM= ../sim/m68hc11/libsim.a -lm There's your "-lm". That means it is trying to link the math library (-lm == libm.a) into the simulator library. But rather than worry about fixing it or even why it's wrong, I'll just tell you that that file doesn't even exist in the current source tree, so your problem is likely to go away (or at least change form) if you go to a more recent gdb version. Good luck! ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: GDB make error: for m68xx toolchain 2008-04-05 3:58 ` Michael Snyder @ 2008-04-07 11:34 ` No.Spam 0 siblings, 0 replies; 5+ messages in thread From: No.Spam @ 2008-04-07 11:34 UTC (permalink / raw) To: gdb Michael Snyder wrote: > On Fri, 2008-04-04 at 12:42 +1000, No.Spam wrote: > >> Michael Snyder wrote: >> >>> On Fri, 2008-04-04 at 12:21 +1000, Nathan K wrote: >>> >>> >>>> Hi people who have more of an idea about this than me, >>>> >>>> For Uni we have to compile for the m68hc11. So I've set about setting up >>>> the toolchain so I can work at home as indicated here. >>>> >>>> My problem is a make error when compiling GDB >>>> >>>> make[1]: *** No rule to make target `-lm', needed by `gdb'. Stop. >>>> make: *** [all-gdb] Error 2 >>>> >>>> I'm running os x, gcc 3.3.5 (using gcc_select), gdb-6.2 with 68hc patch as >>>> indicated on GCC 68HC11 & 68HC12 Sources Installation >>>> >>>> I think this might be referring to the math library, but I'm not sure what >>>> to do about it. perhaps add a config option or edit make file??? >>>> >>>> Thanks in advance for any pointers, >>>> >>>> Nathan >>>> >>>> >>> What's Uni? Oh, university? Heh, you're not at an .edu address... >>> >>> Yes, the error message refers to the math library. >>> "-lm" means "link with libm.a" (or libm.so, depending). >>> But the -lm directive seems to be misplaced somehow, >>> perhaps from your host/target makefile fragment. >>> >>> We're at version 6.8, though -- we can't help you too much >>> with version 6.2... >>> >>> >>> >>> >>> >> Thanks for your response, yeah I use a dumb email address for lists to >> avoid spam. >> >> Could I just go into the Makefile and add the flag? or is it a configure >> option? Where would this directive normally be? >> >> I'd be happy to change to 6.8 but since I'm using it for cross compiling >> I need to ensure that it will work with the m68hc11.... also this is my >> first experience setting up a toolchain, so I'm trying to be >> conservative with what I try (since i'm not sure about what might work >> and don't want to get in over my head). >> >> If anyone know of a toolchain that works with a newer version of GDB >> please let me know. >> > > The version numbers (6.2 and 6.8) are gdb versions, not toolchain. > When people talk about a toolchain version, they're usually referring > to the gcc version number. I don't think that's an issue here. > The issue is that gdb version 6.2 was a long time ago (2004, actually), > and the sources that we work with have changed a lot since then. We > don't generally like to go back in time and help people work with > old versions of the sources -- the general practice is to say "update > to the latest release of gdb, then if you still have problems we'll > help you". > > So not to go against precedent, but... > > I see that in the source version you are using (6.2), there is a > file in the source tree, "gdb/config/m68hc11/m68hc11.mt" > > That file is called a "target makefile fragment", and it winds up > as part of your makefile. And it contains a line that looks like this: > > SIM= ../sim/m68hc11/libsim.a -lm > > There's your "-lm". > > That means it is trying to link the math library (-lm == libm.a) > into the simulator library. > > But rather than worry about fixing it or even why it's wrong, > I'll just tell you that that file doesn't even exist in the > current source tree, so your problem is likely to go away > (or at least change form) if you go to a more recent gdb version. > > Good luck! > > > From - Sat > Thanks Michael. I had a go at changing the compiler to be "gcc -lm" for all cases in the Makefile. However that didn't fix the problem. Also a sample program was compiling fine (using the math library) without -lm included at compile time. So I took your advice and compiled version 6.8 with no problems. The m6811-gcc seems to be producing binary files without error. Now I just have to wait and try one on the actual embedded device to confirm it is working correctly. But all seems to be functioning as expected. Thanks for the great support and well written responses. p.s. I'll post back only if the binary files aren't compiling properly, otherwise assume everything is working ok. Nathan ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-04-06 0:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-04-04 2:43 GDB make error: for m68xx toolchain Nathan K 2008-04-04 9:35 ` Michael Snyder 2008-04-04 11:18 ` No.Spam 2008-04-05 3:58 ` Michael Snyder 2008-04-07 11:34 ` No.Spam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox