Software > Firmware

Cross-build compiler environment for SBE

(1/2) > >>

TimKelly:
Does anyone have a link to the directions to build the cross-build compiler environment necessary to compile the Self-Build Engine source code?  The source code has many references to

# Makefile for P9-XIP image code and tools; works on X86 Linux hosts.

ifndef GCC-TOOL-PREFIX
GCC-TOOL-PREFIX = $(CROSS_COMPILER_PATH)/bin/powerpc-eabi-
endif

TCC     = $(PPETRACEPP_BIN_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc
CC      = $(PPETRACEPP_BIN_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc

I would like to build that cross-build environment natively on Debian on Raptor, as part of my effort to port the building of SBE to strict POSIX 2024 for portability to other build environments.

Thank you,
tim

TimKelly:
I believe I have been able to answer my own question.

https://git.raptorcs.com/git/ppe42-gcc/
https://git.raptorcs.com/git/ppe42-binutils/

After you run git clone for each, you will get the message that HEAD does not exist and have an empty repository.  In the appropriate repository run

git switch gcc-4_9_2-ppe42
git switch binutils-2_24-ppe42

which should populate the repository with the most recent code.

tle:
I have not tried to but wondering have you checked https://github.com/open-power/ppe42-gcc ?

TimKelly:
I have not.  Certainly it looks like there are more instructions, but I gave up after getting internal compiler errors when ppe42-gcc tried to build ppe-binutils.  It was in the internal register allocator (ira) and both the subdirectory configure and Makefiles would not respect flags passed to them, as I documented at

https://forums.raptorcs.com/index.php/topic,617.0.html

However, I did not apply patches to what was in Raptor's source code tree.  Thank you for pointing out the different repository.

TimKelly:
Ok, I installed the open-power sources from Microsoft's Github, but the build failed.

ppe42-gcc binutils fails with

../../ppe42-binutils/bfd/srec.c: In function ‘srec_bad_byte’:
../../ppe42-binutils/bfd/srec.c:254:26: error: ‘%03o’ directive writing between 3 and 11 bytes into a region of size 9 -Werror=format-overflow=]
  254 |         sprintf (buf, "\\%03o", (unsigned int) c);
      |                          ^~~~


The instructions for building ppe42-gcc say install the following patches:

https://github.com/open-power/op-build/blob/master/openpower/package/ppe42-gcc/0001-2016-02-19-Jakub-Jelinek-jakub-redhat.com.patch

https://github.com/open-power/op-build/blob/master/openpower/package/ppe42-gcc/0001-reload-Change-to-type-of-x_spill_indirect_levels.patch

These appear to be embedded within Microsoft's Github pages and not easily downloaded via curl -O.

I stopped here.  The line for me is I am not debugging GNU's binutils or gcc code or hunting around Microsoft's Github in order to build the environment to build the SBE.  There is a gambler's lure here, where maybe just maybe one more hour of effort will make it all work, but it never does.

Navigation

[0] Message Index

[#] Next page

Go to full version