Two Library files with same name

2006-07-31 Thread raja
Hi,

I have two library files with same name(say 'foo') at different
locations(say location A & B). I want to use both the libraries.

If i say -LA -LB in the gcc options, it works. If i say -LB -LA, it doesnt
work. Can you explain me, how gcc resolves this library linking?
When it sees -lfoo, how does it resolve?

-lbar depends on -lfoo at location A and -lbaz depends on -lfoo at
location B.

Thank you,
Raja




gcc-4.3.2 cross build error

2008-12-13 Thread raja . saleru
Hi, I am cross compiling the gcc-4.3.2 for arm based dsp target.
while building, the following error occurs.

Please help us how to proceed further.

Checking multilib configuration for libgcc...
Configuring in dsp/libgcc
..
checking for suffix of object files... configure: error: cannot compute
suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/obj'
make: *** [all] Error 2

The config log contain the following error:

configure:2398: /obj/./gcc/xgcc -B/obj/./gcc/ -B/opt/test/dsp/bin/
-B/opt/test/dsp/lib/ -isystem /opt/test/dsp/include -isystem
/opt/test/dsp/sys-include -o conftest -O2   conftest.c  >&5
conftest.c:1: internal compiler error: in default_secondary_reload, at
targhooks.c:618
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Thanks and Regards
Raja Saleru


gcc-4.3.2 build break at multilib glibc

2008-12-15 Thread raja . saleru


Hi, I am trying to cross compile the gcc-4.3.2 for arm based dsp target.
The following error occurs.

build procedure:

$ ../gcc-4.3.2/configure --target=dsp --prefix=/opt/test
--enable-languages=c --disable-shared --disable-thread
 --disable-nls

$ make

Please help us how to proceed further.

Checking multilib configuration for libgcc...
Configuring in dsp/libgcc
……..
*** Configuration dsp-arm-elf not supported
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/cygdrive/c/obj-gcc-4.3.2'
make: *** [all] Error 2

The config.log file contains the following error:

configure:2817: /cygdrive/c/obj-gcc-4.3.2/./gcc/xgcc
-B/cygdrive/c/obj-gcc-4.3.2/./gcc/ -B/opt/test/dsp/bin/
-B/opt/test/dsp/lib/ -isystem /opt/test/dsp/include -isystem
/opt/test/dsp/sys-include -qlanglvl=ansi -c -O2  conftest.c >&5
xgcc: unrecognized option '-qlanglvl=ansi'
conftest.c:10:19: error: stdio.h: No such file or directory
conftest.c:11:23: error: sys/types.h: No such file or directory
conftest.c:12:22: error: sys/stat.h: No such file or directory
……………

Thanks in Advance
Raja Saleru






Re: gcc-4.3.2 build break at multilib glibc

2008-12-15 Thread raja . saleru
Dear Ben,

Thanks for the reply. We are porting the gcc-4.3.2 into the new DSP target
having ARM 11 core. The new target specific code is added in
gcc/config/dsp and also configuration files are modified. we are using
cygwin as host for building.

All the target specific code is compiled successfully.

We need to use newlib. when to link with gcc ? whether using newlib will
solve the above error ?

Can you mention some link or guidelines on usage of newlib for the above
target ?

Thanks and Regards
Raja Saleru

>> Hi, I am trying to cross compile the gcc-4.3.2 for arm based dsp target.
>> The following error occurs.
>
> Building a cross-compiler for an embedded target requires a little bit
> of know-how, usually best obtained from various guides on the net.  You
> are getting these errors because you need a C library available.  It
> should be possible for you to use newlib on this target.
>
> Ben
>
>



help needed on gcc instruction scheduling with unspec_volatile()

2009-02-02 Thread raja . saleru
Hi,

In gcc, while instruction scheduling can it be possible to suspend the
scheduling for some instructions ? or

Is there a way to make the instruction has to allocate to run without
using the scheduler for particular instruction ?

Currently there is RTL template in machine description unspec_volatile().
If the instruction is scheduled using this, does this make the instruction
out of scope of scheduler ?


Please help us to understand the above.

Thanks in advance
Raja Saleru


Re: help needed on gcc instruction scheduling with unspec_volatile()

2009-02-02 Thread raja . saleru
Dear Ian,

Thanks the reply.

>> Is there a way to make the instruction has to allocate to run without
>> using the scheduler for particular instruction ?
>
> I don't understand the question.

The target we are using supports parallel instruction execution, Max 7.
For one cycle, one instruction packet is executed. one packet has max 7
instructions. so the scheduler is enabled. However, the scheduler enabling
is not required for some packets. so how we can disable the instruction
scheduling for particular packets ?

> Nothing is out of scope of the scheduler.  Using unspec_volatile in
> the RTL template makes the instruction a scheduling barrier and a
> memory barrier.

Can you give more information or link to understand more about
unspec_volatile ? The information available in gcc internals is not
sufficient.

Thanks and Regards
Raja Saleru

> raja.sal...@iap-online.com writes:
>
>> In gcc, while instruction scheduling can it be possible to suspend the
>> scheduling for some instructions ? or
>
> No.  You can turn off instruction scheduling for the entire
> compilation.  You can use #pragma GCC optimize to turn scheduling off
> for a specific function.  But there is no way to turn it off for some
> instructions within a function but not others.
>
>
>> Is there a way to make the instruction has to allocate to run without
>> using the scheduler for particular instruction ?
>
> I don't understand the question.
>
>
>> Currently there is RTL template in machine description
>> unspec_volatile().
>> If the instruction is scheduled using this, does this make the
>> instruction
>> out of scope of scheduler ?
>
> Nothing is out of scope of the scheduler.  Using unspec_volatile in
> the RTL template makes the instruction a scheduling barrier and a
> memory barrier.
>
> Ian
>



unspec_volatile() RTL template

2009-02-03 Thread raja . saleru
Hi,

Can anybody explain about the unspec_volatile() rtl template usage, sample
example and the purpose of it.

Thanks and Regards
Raja Saleru


gnu gcc 3.4.6 debug procedure

2009-02-03 Thread raja . saleru
Hi,

I am using the gcc version 3.4.6. It is cross built for one of the ARM
based target. I would like to build the gcc in debug mode and step by step
debug the code.

The gcc/configure has "-g -O2" option. but if I run through debugger, the
source files of the entire gcc are not visible.

somebody can explain the procedure for gcc debugging ?

Thanks and Regards
Raja Saleru




gmon.out creation procedure

2008-05-19 Thread raja . saleru
Hi,

I am Raja, I need a favor on understand how the gmon.out file is created.
Please help me.

1. gmon.c is available in both gcc and glibc.  Which is the one used to
create gmon.out ?

2. Can you brief how profile information required to create gmon.out is
captured?¡¡Which are the functions are responsible for this ?

3. Suppose assume that executable is built without ¨Cpg option, but want
to create gmon.out at run-time. Is there any way or guidelines to
implement?

Thanks and Regards
Raja Saleru



Re: gmon.out creation procedure

2008-05-20 Thread raja . saleru
Dear Shafi

Thanks you very much for the clear details. Definitely your inputs are
helpful.

1) I am sure that in gcc-4.0 I found there is file gmon.c in the path
gcc-4.0.0/gcc/gmon.c.  Anyhow let me concentrate on gmon.c of glibc.

2) Next thing I would like to know is to better understand the gmon.c of
glibc I would like to degug glibc. since glibc is linked with gcc, I built
gcc and glibc separately. while debugging gcc is referring shared glib
library, but not the one I built freshly for debugging purpose. To  make
this happen, where I need to change the path to like both gcc and glibc ?

3) Please correct me If I am wrong
   a. for every function mcount() function is called to collect the caller
and callee address. where this collected info is placed ?
   b. the flow of monstartup() function
monstartup()-->moncontrol() --> profil()

  who will call the monstartup() ? is it gcrt0 ? before calling the
main() function of our routine ?

   c. write_profiling() --->  write_gmon() functions calls write_hist(),
write_call_graph() and write_bb_counts(). here who calls the
write_profiling() ?

   d. mcleanup() calls write_gmon(). who calls the mcleanup() ? is it
gcrt0 ? after control return from main() function ?

Thanks and Regards
Raja








> 2008/5/19  <[EMAIL PROTECTED]>:
>> Hi,
>>
>> I am Raja, I need a favor on understand how the gmon.out file is
>> created.
>> Please help me.
>>
>> 1. gmon.c is available in both gcc and glibc.  Which is the one used to
>> create gmon.out ?
>
> I don't think gcc has gmon.c. Only glibc has it. You can also find
> gmon in newlib for some targets. But this will be customized for the
> target
>
>>
>> 2. Can you brief how profile information required to create gmon.out is
>> captured?���"B"BWhich are the functions are
responsible for this ?
>
> These days gmon.c is used only to get histogram records(time related
> infomation). All the other information is now produced by gcc itself,
> than can be analyzed using gcov. (You will get gcov when you build
> gcc).
> For histogram records, gmon.c code primarily uses 'profil' system
> call. You can get more information about this in man pages. And of
> course you will get to know how this is used if you go through the
> code in gmon.c
>
> When -pg switch is enabled all complier does is inserting a call to
> the function mcount, usually after the function prologue. This is the
> function the collects all the needed information. For profiling
> information about caller address and callee address is necessary. If
> this information cannot be obtained using __bultin_return_address then
> this is calculated by mcount in a target specific manner and passed
> onto another function that takes these address as the arguments and
> gathers the profiling information.
>
>>
>> 3. Suppose assume that executable is built without ��Cpg
option, but
>> want
>> to create gmon.out at run-time. Is there any way or guidelines to
>> implement?
>
> A call to the profiling function (mcount) should be there to generate
> profiling information. Without that you won't be able to generate
> gmon.out
>
> Hope this helps,
>
> Regards,
> Shafi
>
>>
>> Thanks and Regards
>> Raja Saleru
>>
>>
>



[no subject]

2022-08-01 Thread Raja Raju via Gcc
rajaraju6...@gmail.co