mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-18 20:37:56 +00:00
Merge pull request #1448 from dinuxbg/master
Add PRU target configuration
This commit is contained in:
commit
30316cd27a
8
config/arch/pru.in
Normal file
8
config/arch/pru.in
Normal file
@ -0,0 +1,8 @@
|
||||
# PRU specific config options
|
||||
|
||||
## no-package
|
||||
## select ARCH_SUPPORTS_8
|
||||
## select ARCH_DEFAULT_8
|
||||
##
|
||||
## help The TI PRU core, as defined by:
|
||||
## help http://bbb.io/pru
|
2
config/comp_libs/gnuprumcu.in
Normal file
2
config/comp_libs/gnuprumcu.in
Normal file
@ -0,0 +1,2 @@
|
||||
# gnuprumcu config file
|
||||
## depends on ARCH_PRU
|
@ -1,6 +1,6 @@
|
||||
# Linux kernel options
|
||||
|
||||
## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE
|
||||
## depends on !ARCH_AVR && !ARCH_MSP430 && !ARCH_MOXIE && !ARCH_PRU
|
||||
## select KERNEL_SUPPORTS_SHARED_LIBS
|
||||
|
||||
## help Build a toolchain targeting systems running Linux as a kernel.
|
||||
|
41
packages/gnuprumcu/0.5.0/0001-HACK-Fix-paths-for-crosstool-ng.patch
vendored
Normal file
41
packages/gnuprumcu/0.5.0/0001-HACK-Fix-paths-for-crosstool-ng.patch
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
From b045b2c65e26153813abadc2d065afdd52612fb0 Mon Sep 17 00:00:00 2001
|
||||
From: Dimitar Dimitrov <dimitar@dinux.eu>
|
||||
Date: Fri, 15 Jan 2021 18:52:09 +0200
|
||||
Subject: [PATCH] HACK: Fix paths for crosstool-ng
|
||||
|
||||
For some reason crosstool-ng modifies the default
|
||||
binutils/ld path for ldscripts. Align our respective
|
||||
path.
|
||||
|
||||
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
|
||||
---
|
||||
ldscripts/Makefile.am | 2 +-
|
||||
ldscripts/Makefile.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ldscripts/Makefile.am b/ldscripts/Makefile.am
|
||||
index 23c5903..b6984d5 100644
|
||||
--- a/ldscripts/Makefile.am
|
||||
+++ b/ldscripts/Makefile.am
|
||||
@@ -47,4 +47,4 @@ dist_pru_DATA = \
|
||||
pruelf-tda4vm.icssg1.tx_pru1.x
|
||||
|
||||
|
||||
-prudir = $(exec_prefix)/$(target_alias)/lib
|
||||
+prudir = $(libdir)
|
||||
diff --git a/ldscripts/Makefile.in b/ldscripts/Makefile.in
|
||||
index b58975f..b7aecd2 100644
|
||||
--- a/ldscripts/Makefile.in
|
||||
+++ b/ldscripts/Makefile.in
|
||||
@@ -300,7 +300,7 @@ dist_pru_DATA = \
|
||||
pruelf-tda4vm.icssg1.tx_pru0.x \
|
||||
pruelf-tda4vm.icssg1.tx_pru1.x
|
||||
|
||||
-prudir = $(exec_prefix)/$(target_alias)/lib
|
||||
+prudir = $(libdir)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
--
|
||||
2.20.1
|
||||
|
4
packages/gnuprumcu/0.5.0/chksum
vendored
Normal file
4
packages/gnuprumcu/0.5.0/chksum
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
md5 gnuprumcu-0.5.0.tar.gz ee6110995491dac1a834ca7045931391
|
||||
sha1 gnuprumcu-0.5.0.tar.gz 94eb2aeb88f5654fa041bed07c2fb7860af95047
|
||||
sha256 gnuprumcu-0.5.0.tar.gz 917043152188ad4626f888dbb620e816a523c0599f9a758230a7d687daf915af
|
||||
sha512 gnuprumcu-0.5.0.tar.gz cc3071913db9c364c2e3966ab580b703700c85a3d292e230b5536df45b54e0137dc1e83a2fae80947e3c1ad178e5b6b6d8319a3d576653b423178c443386bd17
|
0
packages/gnuprumcu/0.5.0/version.desc
vendored
Normal file
0
packages/gnuprumcu/0.5.0/version.desc
vendored
Normal file
6
packages/gnuprumcu/package.desc
Normal file
6
packages/gnuprumcu/package.desc
Normal file
@ -0,0 +1,6 @@
|
||||
origin='dinux.eu'
|
||||
repository='git https://github.com/dinuxbg/gnuprumcu.git'
|
||||
bootstrap='autoreconf -vfi'
|
||||
relevantpattern='*.*.*'
|
||||
archive_formats='.tar.gz'
|
||||
mirrors='https://github.com/dinuxbg/gnuprumcu/releases/download/v${CT_GNUPRUMCU_VERSION}'
|
16
samples/pru/crosstool.config
Normal file
16
samples/pru/crosstool.config
Normal file
@ -0,0 +1,16 @@
|
||||
CT_CONFIG_VERSION="3"
|
||||
CT_ARCH_PRU=y
|
||||
CT_OMIT_TARGET_VENDOR=y
|
||||
# CT_DEMULTILIB is not set
|
||||
# CT_LIBC_NEWLIB_FVWRITE_IN_STREAMIO is not set
|
||||
# CT_LIBC_NEWLIB_UNBUF_STREAM_OPT is not set
|
||||
# CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION is not set
|
||||
# CT_LIBC_NEWLIB_ATEXIT_DYNAMIC_ALLOC is not set
|
||||
# CT_LIBC_NEWLIB_MULTITHREAD is not set
|
||||
CT_LIBC_NEWLIB_EXTRA_SECTIONS=y
|
||||
# CT_LIBC_NEWLIB_WIDE_ORIENT is not set
|
||||
CT_LIBC_NEWLIB_NANO_MALLOC=y
|
||||
CT_LIBC_NEWLIB_NANO_FORMATTED_IO=y
|
||||
CT_CC_LANG_CXX=y
|
||||
CT_COMP_LIBS_GNUPRUMCU=y
|
||||
CT_COMP_TOOLS_MAKE=y
|
3
samples/pru/reported.by
Normal file
3
samples/pru/reported.by
Normal file
@ -0,0 +1,3 @@
|
||||
reporter_name="Dimitar Dimitrov"
|
||||
reporter_url="https://github.com/dinuxbg/gnupru"
|
||||
reporter_comment="PRU cross toolchain"
|
5
scripts/build/arch/pru.sh
Normal file
5
scripts/build/arch/pru.sh
Normal file
@ -0,0 +1,5 @@
|
||||
# Compute PRU-specific values
|
||||
|
||||
CT_DoArchTupleValues() {
|
||||
CT_TARGET_ARCH="${CT_ARCH}"
|
||||
}
|
89
scripts/build/companion_libs/400-gnuprumcu.sh
Normal file
89
scripts/build/companion_libs/400-gnuprumcu.sh
Normal file
@ -0,0 +1,89 @@
|
||||
# Build script for gnuprumcu
|
||||
|
||||
do_gnuprumcu_get() { :; }
|
||||
do_gnuprumcu_extract() { :; }
|
||||
do_gnuprumcu_for_build() { :; }
|
||||
do_gnuprumcu_for_host() { :; }
|
||||
do_gnuprumcu_for_target() { :; }
|
||||
|
||||
if [ "${CT_COMP_LIBS_GNUPRUMCU}" = "y" ]; then
|
||||
|
||||
do_gnuprumcu_get() {
|
||||
CT_Fetch GNUPRUMCU
|
||||
}
|
||||
|
||||
do_gnuprumcu_extract() {
|
||||
CT_ExtractPatch GNUPRUMCU
|
||||
}
|
||||
|
||||
|
||||
do_gnuprumcu_for_target() {
|
||||
local -a gnuprumcu_opts
|
||||
|
||||
CT_DoStep INFO "Installing gnuprumcu for the target"
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-gnuprumcu-target-${CT_TARGET}"
|
||||
|
||||
gnuprumcu_opts+=( "destdir=${CT_SYSROOT_DIR}" )
|
||||
gnuprumcu_opts+=( "host=${CT_HOST}" )
|
||||
|
||||
gnuprumcu_opts+=( "cflags=${CT_ALL_TARGET_CFLAGS}" )
|
||||
gnuprumcu_opts+=( "prefix=${CT_PREFIX_DIR}" )
|
||||
do_gnuprumcu_backend "${gnuprumcu_opts[@]}"
|
||||
|
||||
CT_Popd
|
||||
CT_EndStep
|
||||
}
|
||||
|
||||
|
||||
# Build gnuprumcu
|
||||
# Parameter : description : type : default
|
||||
# destdir : out-of-tree install dir : string : /
|
||||
# host : machine to run on : tuple : (none)
|
||||
# prefix : prefix to install into : dir : (none)
|
||||
# cflags : cflags to use : string : (empty)
|
||||
# ldflags : ldflags to use : string : (empty)
|
||||
# shared : also buils shared lib : bool : n
|
||||
do_gnuprumcu_backend() {
|
||||
local destdir="/"
|
||||
local host
|
||||
local prefix
|
||||
local cflags
|
||||
local ldflags
|
||||
local shared
|
||||
local -a extra_config
|
||||
local arg
|
||||
|
||||
for arg in "$@"; do
|
||||
eval "${arg// /\\ }"
|
||||
done
|
||||
|
||||
CT_DoLog EXTRA "Configuring gnuprumcu"
|
||||
|
||||
CT_DoExecLog CFG \
|
||||
CC="${host}-gcc" \
|
||||
RANLIB="${host}-ranlib" \
|
||||
CFLAGS="${cflags}" \
|
||||
LDFLAGS="${ldflags}" \
|
||||
${CONFIG_SHELL} \
|
||||
"${CT_SRC_DIR}/gnuprumcu/configure" \
|
||||
--build=${CT_BUILD} \
|
||||
--host=${host} \
|
||||
--target=${CT_TARGET} \
|
||||
--prefix="${prefix}" \
|
||||
"${extra_config[@]}"
|
||||
|
||||
CT_DoLog EXTRA "Building gnuprumcu"
|
||||
CT_DoExecLog ALL make
|
||||
|
||||
CT_DoLog EXTRA "Installing gnuprumcu"
|
||||
|
||||
# Guard against $destdir$prefix == //
|
||||
# which is a UNC path on Cygwin/MSYS2
|
||||
if [[ ${destdir} == / ]] && [[ ${prefix} == /* ]]; then
|
||||
destdir=
|
||||
fi
|
||||
|
||||
CT_DoExecLog ALL make instroot="${destdir}" install
|
||||
}
|
||||
|
||||
fi # CT_COMP_LIBS_GNUPRUMCU
|
Loading…
Reference in New Issue
Block a user