July 28, 2022

On Thursday, 28 July 2022 at 12:45:51 UTC, Alexander Zhirov wrote:
[...]

>

I have already downloaded the latest GCC sources, nothing compiles anyway.

How did you manage to get hold of this compiler?

/root/usr/program/gcc/9.5.0/install/bin/cc
>

Everything falls on the same error.

checking for suffix of object files... configure: error: in `/home/thinstation/source/gcc/12.1.0/build/i586-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Have you looked into config.log? The errors are frequently located in the second half of the output.

July 28, 2022

On Thursday, 28 July 2022 at 13:16:26 UTC, kdevel wrote:

>

On Thursday, 28 July 2022 at 12:45:51 UTC, Alexander Zhirov wrote:
[...]

>

I have already downloaded the latest GCC sources, nothing compiles anyway.

How did you manage to get hold of this compiler?

/root/usr/program/gcc/9.5.0/install/bin/cc
>

Everything falls on the same error.

checking for suffix of object files... configure: error: in `/home/thinstation/source/gcc/12.1.0/build/i586-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Have you looked into config.log? The errors are frequently located in the second half of the output.

In general, nothing happened. I've already tried everything. Here is the result, posted here.

July 28, 2022

On Thursday, 28 July 2022 at 15:25:00 UTC, Alexander Zhirov wrote:

>

On Thursday, 28 July 2022 at 13:16:26 UTC, kdevel wrote:

>

On Thursday, 28 July 2022 at 12:45:51 UTC, Alexander Zhirov wrote:
[...]

>

I have already downloaded the latest GCC sources, nothing compiles anyway.

How did you manage to get hold of this compiler?

/root/usr/program/gcc/9.5.0/install/bin/cc

Where does this compiler come from?

July 28, 2022

On Thursday, 28 July 2022 at 16:02:11 UTC, kdevel wrote:

>

On Thursday, 28 July 2022 at 15:25:00 UTC, Alexander Zhirov wrote:

>

On Thursday, 28 July 2022 at 13:16:26 UTC, kdevel wrote:

>

On Thursday, 28 July 2022 at 12:45:51 UTC, Alexander Zhirov wrote:
[...]

>

I have already downloaded the latest GCC sources, nothing compiles anyway.

How did you manage to get hold of this compiler?

/root/usr/program/gcc/9.5.0/install/bin/cc

Where does this compiler come from?

This is an unpacked archive from an official source from the GNU website

https://ftp.mpi-inf.mpg.de/mirrors/gnu/mirror/gcc.gnu.org/pub/gcc/releases/gcc-9.5.0/

July 28, 2022

On Thursday, 28 July 2022 at 15:25:00 UTC, Alexander Zhirov wrote:
[...]

> > >

Everything falls on the same error.

checking for suffix of object files... configure: error: in `/home/thinstation/source/gcc/12.1.0/build/i586-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Have you looked into config.log? The errors are frequently located in the second half of the output.

In general, nothing happened. I've already tried everything. Here is the result, posted here.

In such cases I usually take the error message, here

configure: error: cannot compute suffix of object files:

and search with google for it. Google points me to stackoverflow:

https://stackoverflow.com/questions/11502045/gcc-compilation-cannot-compute-suffix-of-object-files-cannot-compile

This issue is caused by dyanmic link library path issue when the test programs try to link against libmpc/libmpfr/libgmp.

Append below environment variable to allow ld link against the correct so file:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/mpc/lib/

Then try build gcc again.

Does this help?

July 28, 2022

On Thursday, 28 July 2022 at 16:03:46 UTC, Alexander Zhirov wrote:
[...]

> > > >

How did you manage to get hold of this compiler?

/root/usr/program/gcc/9.5.0/install/bin/cc

Where does this compiler come from?

This is an unpacked archive from an official source from the GNU website

https://ftp.mpi-inf.mpg.de/mirrors/gnu/mirror/gcc.gnu.org/pub/gcc/releases/gcc-9.5.0/

The archive gcc-9.5.0.tar.gz I found in that directory does not contain any binary compiler. The only "file" named "cc" is the directory

./gcc/testsuite/ada/acats/tests/cc
July 28, 2022

On Thursday, 28 July 2022 at 06:01:17 UTC, Alexander Zhirov wrote:

>

I'm at a dead end, please help, guys.

  1. Can you try with ldc2 --march=32bit-mode? The march list (--march=help) details this as "32-bit mode (80386)".

  2. Can you try with ldc2 --march=i586 -betterC with a simple BetterC program? (Like import core.stdc.stdio; extern(C) void main() { puts("test");})

  3. Otherwise, can you try checking which instruction is illegal under a debugger? The i686 introduced the CMOVcc instruction which I think both compilers emit regardless of march (Default target: i686-pc-linux-gnu), since I think it's the default baseline, but I could be wrong.

July 29, 2022

On Thursday, 28 July 2022 at 06:01:17 UTC, Alexander Zhirov wrote:

>

I did a topic a little earlier about compiling a compiler for processor Geode LX800.
The bottom line is that I have a processor on which I want to compile the program, is an i586 architecture.

Yes, I did it!

I have an i686 host with a GCC 5.3.0 compiler. The build path is /root/source.

  1. Using GCC 5.3.0, I built GCC 9.5.0 in an i686 environment
mkdir /root/source/gcc && cd /root/source/gcc
wget https://ftp.mpi-inf.mpg.de/mirrors/gnu/mirror/gcc.gnu.org/pub/gcc/releases/gcc-9.5.0/gcc-9.5.0.tar.gz
tar xf gcc-9.5.0.tar.gz -C source
cd source
./contrib/download_prerequisites
mkdir /root/source/gcc/build && cd /root/source/gcc/build
../source/configure --prefix=$PWD/../install --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
make -j16
make install
  1. Using GCC 9.5.0, I built LLVM 10.0.1 in an i686 environment
mkdir /root/source/llvm && cd /root/source/llvm
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz
tar xf llvm-project-10.0.1.tar.xz -C source
mkdir /root/source/llvm/build && cd /root/source/llvm/build
export CC=/root/source/gcc/install/bin/gcc
export CXX=/root/source/gcc/gcc-install/bin/g++
cmake ../source -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install -DLLVM_TARGETS_TO_BUILD='X86' -DCOMPILER_RT_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF
make -j16
make install
  1. Downloaded the DMD 2.086.1 compiler (since this version runs on the Geode LX800 processor without any problems)
  2. Copied all this to an external HDD and connected it to my Geode LX800 i586
  3. Using GCC 9.5.0, LLVM 10.0.1 and DMD 2.086.1, I built LDC 2.100.1 on Geode LX800 i586
mkdir -p ~/ldc/build && cd ~/ldc
git clone --recursive https://github.com/ldc-developers/ldc.git source
cd build
export PATH=<PATH_TO_GCC_BIN>:$PATH
cmake ../source -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../install -DLLVM_ROOT_DIR=<PATH_TO_LLVM_INSTALL> -DD_COMPILER=<PATH_TO_DMD_COMPILER_X32>
make
make install
  1. Then, through ldc-build-runtime, I rebuilt the libraries for i586
ldc-build-runtime --dFlags="-mcpu=i586" --cFlags="-march=i586"

When performing the actions, I may have connected the necessary paths to LD_LIBRARY_PATH (I don't remember 😁).

Now LDC with the flag -mcpu=i586 compiles the binaries I need at the output and the architecture fully supports them!

~ # ldc2 --version
LDC - the LLVM D compiler (1.30.0-git-32f5a35):
  based on DMD v2.100.1 and LLVM 10.0.1
  built with DMD32 D Compiler v2.086.1
  Default target: i686-pc-linux-gnu
  Host CPU: geode
  http://dlang.org - http://wiki.dlang.org/LDC

  Registered Targets:
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64

Thank you so much for your help!

As a result, the reassembly of the runtime and phobos libraries helped. Would it be cool to figure out how to rebuild the DMD library for i586?

1 2
Next ›   Last »