Ian Lance Taylor | 1 Oct 2004 02:37

Re: Linkerscript

"Meulendijks, J." <Meulendijks <at> WT.TNO.NL> writes:

> I read the following on the internet:

Well, there you go.  You can't trust the Internet.

> "You can specify a file name to include sections from a particular file. You
> would do this if one or more of your files contain special data that needs to be
> at a particular location in memory. For example, use the following input.
>   
> data.o(.data)"
> 
> But when I use this the linker says: "cannot find data.o". But the linkcommand
> is including the directory in which data.o is located. I do this with the -L
> option.
> I don't see what's is wrong with it but I only get this to work if I replace
> "data.o(.data)" with "c:/bla/bla/data.o(.data)". So I must give the absolute
> path and that's NOT what I want.

This is not a gcc question.  ld is part of the binutils.  For binutils
help, see http://sourceware.org/binutils/

In a linker script, using data.o within a SECTIONS command tells the
linker what to do with data.o, but it doesn't tell the linker to
actually use data.o.  Putting INPUT(data.o) in your linker script will
probably do what you want.  See the linker manual for more
information.

Ian

(Continue reading)

Sam C. Nicholson !! | 1 Oct 2004 06:43

default library search path(s) for gcc

Greetings,

Short question:

Is there a configure option akin to --with-local-prefix
which tells gcc to look in /usr/local/lib for -libs even
as GCC is installed in /some/other/place?  For, as I read
(and experience) --with-local-prefix affect include, not
library search paths.  

Background:

Moving from SunOS5.8 to 5.10 and from sparc to x86.
Had previously built gcc with configure --prefix=/usr/local and
then installed it first to make my svr4 packages.

This time around, I'm trying to be more regular and am
putting packages in /usr/local/pkg/, and then building
them into svr4 packages directly from their destination.

Seems to work, but for one hic with gcc.

Seems I've gotten very fond of not having to say -L /usr/local/lib
-R /usr/local/lib in my Makefiles.  If I understand correctly,
gcc (gcc.c, the compiler driver) takes care of this because
--libdir is set to prefix/lib, and when --prefix=/usr/local all
just works out.  

However (and here is where I need to confirm my understanding),
gcc looks in /usr/local/lib because that is where it expects to
(Continue reading)

lego | 1 Oct 2004 14:24
Picon

Macro expansion without merging include files

Is it possible to only expand macros in a c source file without invoking
the other preprocessor directives? I have studied the manual for the
preprocessor and the m4 macro expander without comming up with any
solution. Are there any other solutions for this problem perhaps?

Sincere,
Lego

Claudio Bley | 1 Oct 2004 14:50
Picon
Favicon

Re: Macro expansion without merging include files

On Fri, Oct 01, 2004 at 02:24:49PM +0200, lego <at> gentoo.se wrote:
> Is it possible to only expand macros in a c source file without invoking
> the other preprocessor directives? I have studied the manual for the
> preprocessor and the m4 macro expander without comming up with any
> solution. Are there any other solutions for this problem perhaps?

Why don't you just remove the unwanted include lines with a sed,
awk, perl or ... script and pipe it into the preprocessor?

--

-- 
Claudio

Sriharsha Vedurmudi | 1 Oct 2004 15:21
Favicon

Re: Macro expansion without merging include files

lego <at> gentoo.se wrote:

>Is it possible to only expand macros in a c source file without invoking
>the other preprocessor directives? I have studied the manual for the
>preprocessor and the m4 macro expander without comming up with any
>solution. Are there any other solutions for this problem perhaps?
>
>Sincere,
>Lego
>  
>
gcc -E <filename>

-E will ONLY preprocess. No compilation/assembling/linking will take place.

If you already know that and are looking for something else, im Sorry.

Cheers

--

-- 
 *****************************
 * Sriharsha Vedurmudi			
 * Software Engineer		
 * 
 * Redpine Signals Inc.	
 * Gate #395, Plot 87,88			
 * Sagar Society, Road #2, 
 * Banjara Hills,		
 * Hyderabad - 500 034			
 * www.redpinesignals.com	
(Continue reading)

Pradip Singh | 1 Oct 2004 18:14

gcc build error

Hi all,

  I building the gcc for arm-linux target and I am getting the following compilation problem. All the source
code for toolchain was taken as mentioned in the arm site.

  The Error is 

 crti.o No such file or directory. It was giving this error when it was trying to build libgcc_s.so

the gcc was configured as follows.

../gcc-2004-q1a/configure --target=arm-linux --prefix=/root/armlinux/arm_tools
--enable-languages=c --disable-threads --with-cpu=arm1020t --with-arch=armv5te

Any Help will be appreciated.

Tahnks and regards,
Pradip

lrtaylor | 1 Oct 2004 18:22

RE: Delete old version of g++?

That might be possible, but it may not be desirable.  It depends on how
your compiler is installed, what versions the old and new compiler are,
and what OS it's on, among other things.  For example if you're
upgrading from 2.x to 3.x, then you probably don't want to get rid of
your old compiler.  The problem is that C++ libraries are not compatible
between the two compilers, so if you try to compile a C++ program using
your new compiler and use a C++ library built with your old compiler,
it's not going to work.

It's hard to give a better answer, though, without knowing more about
your situation.

Thanks,
Lyle

-----Original Message-----
From: gcc-help-owner <at> gcc.gnu.org [mailto:gcc-help-owner <at> gcc.gnu.org] On
Behalf Of Julian Daly
Sent: Thursday, September 30, 2004 9:55 AM
To: gcc-help <at> gcc.gnu.org
Subject: Delete old versionof g++?

Hello,

Is it possible when I have compiled a new version of g++ for my system
to only
use that new version and that I could delete the old version?

Thanks,

(Continue reading)

Danilo José | 1 Oct 2004 20:16
Favicon

problems porting from UNIX to Mac OS X 10.2 Darwin 6.8

 have some problems porting a working code to the gcc-937.2 gcc2 based on
the gcc 2.95.2.

 The same library works fine with gcc 1175, (gcc3 based on 3.1).

  The thing is why the same library in gcc 1175, (gcc3 based on 3.1)  with
the same flags gives problems of undefined reference symbols when building
the executable. I have already tried the f-no-implicit-templates flag.

 have compiled  the objects without any problem. I create the static library
using the ar command.

 The thing is that when I use the library to build an executable it gives me
some errors of undefined symbols.

  One person of another mail list, recommended me to compile everything in
an object, using ld -r *.o -o new.o. And then build de library with those
values.

  With this the number of unreferenced symbols reduced to 4 only. That
appear as 's' when calling to nm and c++filt.

  He recommended me to delete no_toc in the temporary .s files, but it did
not have any other effect. And to change in the temporary files, the
private_extern for globl. It gave a lot of problems.

  I do not find the libgcc.a inside the 2.95.2 directory, only the 3.1
directory, maybe that is affecting the building.

  But if I use directly the objects the executable works correctly.
(Continue reading)

Joshua Wigginton | 2 Oct 2004 00:34

FW: Problems making GCC 2.95.2


-----Original Message-----
From: Joshua Wigginton 
Sent: Friday, October 01, 2004 6:33 PM
To: 'gcc-help <at> gcc.gnu.org'; 'jeff <at> mock.com'
Cc: 'ksseol <at> innoplus.com'
Subject: Problems making GCC 2.95.2

Hello:

I am currently attempting to cross-compile Binutils 2.10.0.24, GCC 2.95.2 patch w/ diff-991022, and
GLIBC2 2.1.3 for arm-linux.

Following guide from http://www.mock.com/receiver/tools/  (to be more exact the modified version from
www.phototainer.com with very slight differences)

Any help and assistance in helping me resolve this would be greatly appreciated.  I have been stumped on this
for quite some time, try different configures, etc.  I hoping this is a common problem and that it can easily
be fixed.  Thanks for your time and patience.

Josh Wigginton
SmartDisk Corporation

Only differences in jeff mocks version and the version I'm trying to run are:

Kernel 2.4.19 rmk 6
Binutils 2.10.0.24
Make config kernel includes for edb7211 compared to strong-arm and configure gcc with cpu arm7tdmi
compared to strong-arm

(Continue reading)

Alan Modra | 2 Oct 2004 01:36
Picon

Re: gcc build error

On Fri, Oct 01, 2004 at 09:44:32PM +0530, Pradip Singh wrote:
>  crti.o No such file or directory. It was giving this error when it was trying to build libgcc_s.so

configure with --disable-shared.  You can't build shared libraries until
you have glibc installed.

--

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Gmane