public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem when using gcc 4.1 + binutil 2.16.92 + glibc 2.4 + ARM EABI
@ 2006-06-01  2:21 Fengwei Yin
  2006-06-01  7:59 ` openmp support Thomas Yeh
  0 siblings, 1 reply; 5+ messages in thread
From: Fengwei Yin @ 2006-06-01  2:21 UTC (permalink / raw)
  To: gcc-help

Hi,
When enable the gcc 4.1 with EABI support for ARM, I met such situation about
the alignment.

Here is my test case:

#include <stdio.h>
#include <stdlib.h>

struct test {
       char c1;
       long long  n;
       char c2;
};

int my_temp(void)
{
       int i;
       int j;
       char str[2];
       long long l1;
       long long l2;
       char str2;

       printf("%s:\tj address:         0x%08x, str address:    0x%08x\n",
__func__, &j, str);
       printf("%s:\tl1 address:        0x%08x, l2 address:     0x%08x\n",
__func__, &l1, &l2);
       printf("%s:\tstr2 address:      0x%08x\n", __func__, &str2);
       return 0;
}

main()
{
       struct test t;

       my_temp();

       printf("%s:\ttest.c1 address:   0x%08x\n", __func__, &(t.c1));
       printf("%s:\ttest.n address:    0x%08x\n", __func__, &(t.n));
       printf("%s:\ttest.c2 address:   0x%08x\n", __func__, &(t.c2));
}

With the gcc 4.1 + EABI for ARM(build optioni: -mabi=aapcs-linux -O2),
I get following output:

[root@Linux /test]#./test.gnu.eabi
my_temp:        j address:      0xbea85ac0, str address:        0xbea85abe
my_temp:        l1 address:     0xbea85ab0, l2 address:         0xbea85aa8
my_temp:        str2 address:   0xbea85aa7
main:   test.c1 address:        0xbea85ad8
main:   test.n address:         0xbea85ae0
main:   test.c2 address:        0xbea85ae8

With the gcc 3.4.3 without EABI(build option: -O2), I get following output:
[root@Linux /test]#./test.gnu
my_temp:        j address:      0xbeb69bf8, str address:        0xbeb69bf0
my_temp:        l1 address:     0xbeb69be8, l2 address:         0xbeb69be0
my_temp:        str2 address:   0xbeb69bdf
main:   test.c1 address:        0xbeb69c10
main:   test.n address:         0xbeb69c18
main:   test.c2 address:        0xbeb69c20

Please notice the address of the str and j. there IS NO memory hole
between therm
when using gcc 3.4.3 and there IS memory hole when using gcc 4.1.


Does anyone know the reason about this problem? Thanks a lot.



Regards
Yin, Fengwei

^ permalink raw reply	[flat|nested] 5+ messages in thread

* openmp support
  2006-06-01  2:21 Problem when using gcc 4.1 + binutil 2.16.92 + glibc 2.4 + ARM EABI Fengwei Yin
@ 2006-06-01  7:59 ` Thomas Yeh
  2006-06-01 12:06   ` Tim Prince
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Yeh @ 2006-06-01  7:59 UTC (permalink / raw)
  To: gcc-help

Hi All,

  According to the gcc news, gcc 4.X seems to support openMP. Can anyone
point me to the libraries I need for both tru64 linux and x86 linux?

thx,
Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: openmp support
  2006-06-01  7:59 ` openmp support Thomas Yeh
@ 2006-06-01 12:06   ` Tim Prince
  2006-06-01 18:30     ` Thomas Yeh
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Prince @ 2006-06-01 12:06 UTC (permalink / raw)
  To: Thomas Yeh; +Cc: gcc-help

Thomas Yeh wrote:
> Hi All,
> 
>   According to the gcc news, gcc 4.X seems to support openMP. Can anyone
> point me to the libraries I need for both tru64 linux and x86 linux?
> 

Maybe I don't understand your question.  Inclusion of OpenMP in gcc-4.1 
isn't going to affect gcc-4.0.  Unless someone has tested gcc 4.1 on 
tru64, that part of the question seems moot.
On linux (32 bit?), reading the gcc build instructions should give you 
some clue about library updates which may be required on top of a 
reasonably current distro with gcc development components installed. 
For example, gmp with mpfr enabled would be needed for a full 
installation of gcc-4.1.  That might be there already if your distro 
includes gcc-4.0.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: openmp support
  2006-06-01 12:06   ` Tim Prince
@ 2006-06-01 18:30     ` Thomas Yeh
  2006-06-01 23:59       ` make error for development branch Thomas Yeh
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Yeh @ 2006-06-01 18:30 UTC (permalink / raw)
  To: tprince; +Cc: gcc-help

I've tried a small test using the parallel for openmp pragma. The test
compiles but the performance looks similar to a serial version. Also, the
compiler complains when I use omp_set_num_threads and omp_get_num_threads.

Is there a flag I need to use when compiling?



Tom

On Thu, 1 Jun 2006, Tim Prince wrote:

> Thomas Yeh wrote:
> > Hi All,
> >
> >   According to the gcc news, gcc 4.X seems to support openMP. Can anyone
> > point me to the libraries I need for both tru64 linux and x86 linux?
> >
>
> Maybe I don't understand your question.  Inclusion of OpenMP in gcc-4.1
> isn't going to affect gcc-4.0.  Unless someone has tested gcc 4.1 on
> tru64, that part of the question seems moot.
> On linux (32 bit?), reading the gcc build instructions should give you
> some clue about library updates which may be required on top of a
> reasonably current distro with gcc development components installed.
> For example, gmp with mpfr enabled would be needed for a full
> installation of gcc-4.1.  That might be there already if your distro
> includes gcc-4.0.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* make error for development branch
  2006-06-01 18:30     ` Thomas Yeh
@ 2006-06-01 23:59       ` Thomas Yeh
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Yeh @ 2006-06-01 23:59 UTC (permalink / raw)
  To: gcc-help

I am trying to build the latest gcc in order to make use of gomp, and
I am hitting the following errors during the build.

The only option I used during configuration is --enable-libgomp.
Anyone seen this error?


/bin/sh: build/genmodes: No such file or directory
make[3]: *** [s-modes-h] Error 127
make[3]: Leaving directory `/home/tomyeh/objdir/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/tomyeh/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/tomyeh/objdir'
make: *** [all] Error 2

thx,
Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-01 23:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-01  2:21 Problem when using gcc 4.1 + binutil 2.16.92 + glibc 2.4 + ARM EABI Fengwei Yin
2006-06-01  7:59 ` openmp support Thomas Yeh
2006-06-01 12:06   ` Tim Prince
2006-06-01 18:30     ` Thomas Yeh
2006-06-01 23:59       ` make error for development branch Thomas Yeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).