Skip to content

Commit

Permalink
Temp.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Aug 25, 2018
1 parent fc7b5f6 commit ec4d37c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 51 deletions.
67 changes: 53 additions & 14 deletions gcc/newlib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,50 @@ set -e

if [ x"$TRAVIS" = xtrue ]; then
CPU_COUNT=2
else
echo "CFLAGS='$CFLAGS'"
echo "CXXFLAGS='$CXXFLAGS'"
echo "CPPFLAGS='$CPPFLAGS'"
echo "DEBUG_CXXFLAGS='$DEBUG_CXXFLAGS'"
echo "DEBUG_CPPFLAGS='$DEBUG_CPPFLAGS'"
echo "LDFLAGS='$LDFLAGS'"
fi
unset CFLAGS
unset CXXFLAGS
unset CPPFLAGS
unset DEBUG_CXXFLAGS
unset DEBUG_CPPFLAGS
echo
echo
echo "============================================================"
echo "CFLAGS='$CFLAGS'"
echo "CXXFLAGS='$CXXFLAGS'"
echo "CPPFLAGS='$CPPFLAGS'"
echo "DEBUG_CXXFLAGS='$DEBUG_CXXFLAGS'"
echo "DEBUG_CPPFLAGS='$DEBUG_CPPFLAGS'"
echo "LDFLAGS='$LDFLAGS'"
echo "------------------------------------------------------------"
export CXXFLAGS="$(echo $CXXFLAGS | sed -e's/-std=c++17 //')"
export CPPFLAGS="$(echo $CPPFLAGS | sed -e's/-std=c++17 //')"
export DEBUG_CXXFLAGS="$(echo $DEBUG_CXXFLAGS | sed -e's/-std=c++17 //')"
export DEBUG_CPPFLAGS="$(echo $DEBUG_CPPFLAGS | sed -e's/-std=c++17 //')"
echo "CFLAGS='$CFLAGS'"
echo "CXXFLAGS='$CXXFLAGS'"
echo "CPPFLAGS='$CPPFLAGS'"
echo "DEBUG_CXXFLAGS='$DEBUG_CXXFLAGS'"
echo "DEBUG_CPPFLAGS='$DEBUG_CPPFLAGS'"
echo "LDFLAGS='$LDFLAGS'"
echo "============================================================"
echo
echo
echo "Start directory ============================================"
echo $PWD
ls -l $PWD
echo "------------------------------------------------------------"
ls -l $PWD/*
echo "============================================================"
echo
echo
echo "Source directory ==========================================="
echo $SRC_DIR
ls -l $SRC_DIR
echo "------------------------------------------------------------"
ls -l $SRC_DIR/*
echo "SRC_DIR/work------------------------------------------------"
ls -l $SRC_DIR/work || true
echo "SRC_DIR/gcc--------------------------------------------"
ls -l $SRC_DIR/gcc || true
echo "============================================================"
echo
echo

TARGET=${toolchain_arch}-elf
GCC=$TARGET-newlib-gcc
Expand All @@ -27,6 +58,14 @@ GCC=$TARGET-newlib-gcc
$TARGET-as --version

# Check the "nostdc" gcc is already installed
echo -n "---?"
which $TARGET-gcc
ls -l $(which $TARGET-gcc)
file $(which $TARGET-gcc)
echo "---"
$TARGET-gcc --version 2>&1
echo "---"

GCC_STAGE1_VERSION=$($TARGET-gcc --version 2>&1 | head -1 | sed -e"s/$TARGET-gcc (GCC) //")
GCC_STAGE2_VERSION=$(echo $PKG_VERSION | sed -e's/-.*//')
if [ "$GCC_STAGE1_VERSION" != "$GCC_STAGE2_VERSION" ]; then
Expand All @@ -41,10 +80,8 @@ fi

set -x

echo $PWD
rm -rf libstdc++-v3
cd ..
ls -l

mkdir -p build-newlib
cd build-newlib
Expand All @@ -59,6 +96,8 @@ cd ..

mkdir -p build-gcc
cd build-gcc


#export LDFLAGS=-static
$SRC_DIR/configure \
\
Expand Down
9 changes: 9 additions & 0 deletions gcc/newlib/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ requirements:
# Arch specific
- binutils-{{ toolchain_arch }}-elf
- gcc-{{ toolchain_arch }}-elf-nostdc
build:
- gmp >=4.3.2
- mpfr >=2.4.2
- mpc >=0.8.1
- isl
- cloog
# Arch specific
- binutils-{{ toolchain_arch }}-elf
- gcc-{{ toolchain_arch }}-elf-nostdc
run:
- binutils-{{ toolchain_arch }}-elf
- gcc-{{ toolchain_arch }}-elf-nostdc
Expand Down
56 changes: 20 additions & 36 deletions gcc/nostdc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,55 +30,39 @@ echo "LDFLAGS='$LDFLAGS'"
echo "============================================================"
echo
echo

TARGET=${toolchain_arch}-elf

CONDA_PYTHON=$(conda info --root)/bin/python

# Check binutils
$TARGET-as --version

echo
echo
echo "Start dir==================================================="
echo $PWD
ls -l
echo "------------------------------------------------------------"
ls -l *
echo "============================================================"
echo
echo

rm -rf libstdc++-v3

cd ..

echo
echo
echo "TOP DIR====================================================="
echo "Start directory ============================================"
echo $PWD
ls -l
ls -l $PWD
echo "------------------------------------------------------------"
ls -l *
ls -l $PWD/*
echo "============================================================"
echo
echo

echo
echo
echo "SRC DIR ===================================================="
echo "Source directory ==========================================="
echo $SRC_DIR
ls -l $SRC_DIR
echo "------------------------------------------------------------"
ls -l $SRC_DIR/*
echo "SRC_DIR/work------------------------------------------------"
ls -l $SRC_DIR/work
echo "SRC_DIR/work/gcc--------------------------------------------"
ls -l $SRC_DIR/work/gcc
ls -l $SRC_DIR/work || true
echo "SRC_DIR/gcc-------------------------------------------------"
ls -l $SRC_DIR/gcc || true
echo "============================================================"
echo
echo

TARGET=${toolchain_arch}-elf
GCC=$TARGET-gcc

# Check binutils
$TARGET-as --version

set -x

rm -rf libstdc++-v3
cd ..


mkdir -p build-gcc
cd build-gcc

Expand Down Expand Up @@ -117,4 +101,4 @@ cd ..

VERSION_DIR="$(echo $SRC_DIR | sed -e's-/work/.*-/work/-')"

$PREFIX/bin/$TARGET-gcc --version
$PREFIX/bin/$GCC --version
3 changes: 2 additions & 1 deletion gcc/nostdc/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source:
{% endif %}

build:
detect_binary_files_with_prefix: True
detect_binary_files_with_prefix: False
# y==GIT_DESCRIBE_NUMBER, z==DATESTR, x==GIT_DESCRIBE_HASH
#
# number: 10693001803050325
Expand All @@ -38,6 +38,7 @@ requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
host:
# These are taken from the output of the configure scripts
- gmp >=4.3.2
- mpfr >=2.4.2
Expand Down

0 comments on commit ec4d37c

Please sign in to comment.