Picon
Favicon

Help required when building gcc-4.1.2 for i686 environment

Hello,

I am trying to build a gcc/g++ tool-chain for i486 architechture on an
x86_64 machine.
I downloaded gcc-4.1.2 and configured it with host as x86_64 and target
as i486 after installing the pre-requistes i.e gmp, mrpf, and mpc
libraries .

../gcc-4.1.2/configure --with-gmp=/auto/local//prbatra/gcc-install/
--with-mpfr=/auto/local//prbatra/gcc-install/
--prefix=/auto/local//prbatra/gcc-install/ --host=x86_64-gnu-linux
--target=i486-gnu-linux --enable-languages=c,c++,objc

I also installed binutils with the same host and target for asssembler,
loaded etc

/auto/local//prbatra/objdir/./gcc/xgcc
-B/auto/local//prbatra/objdir/./gcc/
-B/auto/local//prbatra/gcc-install//i486-gnu-linux/bin/
-B/auto/local//prbatra/gcc-install//i486-gnu-linux/lib/ -isystem
/auto/local//prbatra/gcc-install//i486-gnu-linux/include -isystem
/auto/local//prbatra/gcc-install//i486-gnu-linux/sys-include -O2  -O2 -g
-O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-4.1.2/gcc
-I../../gcc-4.1.2/gcc/. -I../../gcc-4.1.2/gcc/../include
-I../../gcc-4.1.2/gcc/../libcpp/include
-I/auto/local//prbatra/gcc-install//include
-I/auto/local//prbatra/gcc-install//include -fexceptions
(Continue reading)

junfeng dong | 9 Feb 12:13
Picon
Gravatar

question about the usage of VFP register on arm

Hi,
my arm cross compiler runs into an error like :
ld: error: a.out uses VFP register arguments, /tmp/ccGm43Jh.o does not

It seems ld requires all input files and output file has the same
attribute of Tag_ABI_VFP_args, which is set by gcc in assembler file
(.eabi_attribute 28, 1).
but I didn't find the place where gcc cope with it. I wonder is this
attribute controlled only by "-mfloat-abi"? -mfloat-abi=hard means "
Tag_ABI_VFP_args=1" while -mfloat-abi=soft/softfp means "
Tag_ABI_VFP_args=0"?is there any other compile option affect that
attribute?
Any comments are welcome.

Thanks
J.F.

Tobias Burnus | 9 Feb 09:35
Picon

GNU Fortran for Bluegene - compiler and toolchain

Hi all,

maybe someone has a suggestion.

Tobias

-------- Original Message --------
Subject: GNU Fortran for Bluegene - compiler and toolchain
Date: Tue, 07 Feb 2012 09:55:00 +0000
From: Keith Refson <krefson .a.t. googlemail .dot. com>
Newsgroups: comp.lang.fortran

Does anyone have any experience building a recent version of gfortran
for use on the IBM Blue Gene. Building the cross-compiler for the double 
hummer 450d is a lot tougher than a native build on x86 linux, and the 
integration/obtaining the rest of the toolchain has so far defeated me.

We really need a serious alternative to the IBM compilers on this
platform, so if anyone has any experience with this, I'd like to hear
from you.

Thanks

Keith Refson
--

-- 
Dr Keith Refson,
Building R25A
STFC Rutherford Appleton Laboratory
Harwell Science and Innovation Campus
Didcot
(Continue reading)

xunxun | 9 Feb 09:33
Picon

GCC's -ffast-math behavior

Hi, all

There is something with -ffast-math I don't understand.

     I want to know why gcc don't use other math lib when using 
-ffast-math.

     Take the test.c for example,

        gcc -O3 -c test.c -o test1.o
        nm test1.o  shows:
------------------------
00000000 b .bss
00000000 d .data
00000000 i .drectve
00000000 r .eh_frame
00000000 r .rdata
00000000 t .text
00000000 t .text.startup
          U ___main
          U _exp
00000000 D _in
00000000 T _main
00000080 C _out
          U _printf
------------------------

        gcc -O3 -ffast-math -c test.c -o test2.o
        nm test.2.o shows:
------------------------
(Continue reading)

Alexandre Roy | 8 Feb 15:56
Picon
Favicon

gfortran on windows 7

Hi,

I would like to know if there is a version of gfortran running on  
windows 7 and if yes, where I can find it?

Thank you

Alexandre Roy

Henning Thedens | 8 Feb 13:52
Picon
Picon
Gravatar

building error

On building gcc4.6.2 i got the foolowing error message (after more then 1 hour)

libtool: link: /home/henning/gcc_neu/bhelp/./gcc/xgcc -B/home/henning/gcc_neu/bhelp/./gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/
-isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include    -shared  .libs/gnu_java_math_GMP.o
../../../native/jni/classpath/.libs/jcl.o   /home/henning/gcc_neu/bhelp/./gmp/.libs/libgmp.a   
-Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so 
/usr/bin/ld: /home/henning/gcc_neu/bhelp/./gmp/.libs/libgmp.a(mp_set_fns.o): relocation
R_X86_64_32 against `__gmp_default_allocate' can not be used when making a shared object; recompile
with -fPIC 
/home/henning/gcc_neu/bhelp/./gmp/.libs/libgmp.a: could not read symbols: Bad value 
collect2: ld returned 1 exit status 
make[6]: *** [libjavamath.la] Fehler 1 
make[6]: Verlasse Verzeichnis
'/home/henning/gcc_neu/bhelp/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math' 
make[5]: *** [all-recursive] Fehler 1 
make[5]: Verlasse Verzeichnis
'/home/henning/gcc_neu/bhelp/x86_64-unknown-linux-gnu/libjava/classpath/native/jni' 
make[4]: *** [all-recursive] Fehler 1 
make[4]: Verlasse Verzeichnis
'/home/henning/gcc_neu/bhelp/x86_64-unknown-linux-gnu/libjava/classpath/native' 
make[3]: *** [all-recursive] Fehler 1 
make[3]: Verlasse Verzeichnis
'/home/henning/gcc_neu/bhelp/x86_64-unknown-linux-gnu/libjava/classpath' 
make[2]: *** [all-recursive] Fehler 1 
make[2]: Verlasse Verzeichnis '/home/henning/gcc_neu/bhelp/x86_64-unknown-linux-gnu/libjava' 
make[1]: *** [all-target-libjava] Fehler 2 
make[1]: Verlasse Verzeichnis '/home/henning/gcc_neu/bhelp' 
make: *** [all] Fehler 2 
(Continue reading)

Aurelien Buhrig | 8 Feb 13:32
Picon

movdi/df + reload issues

Hi,

I'm trying to add the movdi/movdf patterns to my HI target.
Everything is working without this pattern, but it will bring further
optimizations.

The problem is that I'm not able to make it work. I have several reload
issues and some questions to figure out how to fix them.

- I first try to define it with a post reload define_plit and the
constraints actually supported by HImode. But I'm getting an "unable to
find a register to spill in class DATA_REGS". This occurs around
function calls or lib calls which use 4 DATA_REGS class registers for
params amoung 7, what seems to make reload impossible if parameters are
allocated before the failed reload (?). I'm not sure of this... Any
opinion on this?
And is there a minimum number of registers in the class to make reload
work around some function calls?

- So I tried another option which seems to be less greedy: splitting
after reload with a scratch HI reg and more general constraints (such as
m:DI->m:DI through the scratch:HI), so does the m68hc11 target. The
generated code is better, but I'm facing another reload issue with the
insn that does not match its constraints, whereas it does for the 2
operands. only the scratch register has not been allocated. Is it a
matter of secondary_reload_info in TARGET_SECONDARY_RELOAD? What should
be done?
And once it will be fixed, should I define a tmp register and its
associated constraint to pass to match_scratch to save a register when
actually no scratch is needed ?
(Continue reading)

Picon
Gravatar

Unexpected C++ program result

Hi list, I hope it is the right place to post this question.

BEGIN OF CODE
-------------------------

#include <iostream>

class Base
{
public:
        Base() {std::cout << "Build Base" << std::endl;};
        virtual ~Base() {std::cout << "Destroy Base" << std::endl;};
};

class Derived1 : virtual public Base
{
public:
        Derived1() {std::cout << "Build Derived1" << std::endl;};
        ~Derived1() {std::cout << "Destroy Derived1" << std::endl;};
};

class Derived2 : virtual public Base
{
public:
        Derived2() {std::cout << "Build Derived2" << std::endl;};
        ~Derived2() {std::cout << "Destroy Derived2" << std::endl;};
};

class Final : public Derived1, public Derived2
{
(Continue reading)

Xin Tong | 7 Feb 17:56
Picon

How does GCC access global variables on x86

I am wondering how gcc accesses global variables on x86. from the code
i have seen so far, it seems to use the %RIP as the base register. Is
it always like this?

  4006f9:       f0 80 0d bf 0b 20 00    lock orb $0x0,0x200bbf(%rip)
     # 6012c0 <t2lockor>
  400700:       00

t2lockor is a global variables.

Thanks

Xin

Michal Sojka | 7 Feb 15:29
Picon
Favicon
Gravatar

g++ compile error in unused template

Hi list,

does anyone know why I get the following error when compiling this code?

template<class T>
struct Base {
        template <class A>
        void func() {}
};

template<class T>
struct Child : public Base<T> {
        unsigned func2() {
                Base<T>::func< Child<T> >();
        }
};

main() {}

The compiler output is:

x.cc: In member function ‘unsigned int Child<T>::func2()’:
x.cc:10:41: error: expected primary-expression before ‘>’ token
x.cc:10:43: error: expected primary-expression before ‘)’ token

Compiler is "g++ (Debian 4.6.2-9) 4.6.2", but the result is the same
even with g++ 4.4 and g++ 4.5.

Thank you,
-Michal
(Continue reading)

Neal Becker | 7 Feb 13:50
Picon

LTO for shared libs?

Can LTO be used to build shared libs? 

Would it be useful?


Gmane