Changes On Branch platform-esp32

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch platform-esp32 Excluding Merge-Ins

This is equivalent to a diff from f1ead69217 to 105565af89

2017-12-01
18:23
Started working on adding ESP32 support Leaf check-in: 105565af89 user: rkeene tags: platform-esp32
2017-09-26
15:05
Fixed typo check-in: 6337662095 user: rkeene tags: trunk
2017-01-10
13:41
Build-CC 0.13 check-in: f1ead69217 user: rkeene tags: trunk, 0.13
13:39
Added SHA256 to many downloads check-in: c2e33b6d3e user: rkeene tags: trunk

Changes to build-cc.

63
64
65
66
67
68
69

70
71
72
73
74
75
76
77

78
79
80
81
82
83
84

85
86
87
88
89
90
91
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94







+








+







+








## Parse arguments
### Determine list of platforms
platforms=(
	armel-generic-linux-uclibc
	mipsel-generic-linux-uclibc
	mips-generic-linux-musl
	arm-generic-linux-gnueabihf
	x86_64-generic-linux-musl
	x86_64-generic-linux-gnu
)

untested_platforms=(
	powerpc-generic-linux-gnu
	powerpc-generic-linux-uclibc
	mips64-ubnt-linux-gnu
	xtensa-esp32-elf
)

if [ "${BUILD_CC_USE_UNTESTED}" = '1' ]; then
	platforms=("${platforms[@]}" "${untested_platforms[@]}")
fi

idx="${#platforms[@]}"

for platform in "${BUILD_CC_PLATFORMDIR}"/*-platform.tar.bz2; do
	if [ ! -f "${platform}" ]; then
		continue
	fi

	platform="$(basename "${platform}" | sed 's@-platform.tar.bz2$@@')"

293
294
295
296
297
298
299









300
301
302
303
304
305
306
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318







+
+
+
+
+
+
+
+
+







	##### XXX: TODO: Build the extra flags as an array for safety
	if ! echo "${add}" | grep '[;|<>]' >/dev/null; then
		BUILD_CC_GCC_CONFIGURE_EXTRA="${BUILD_CC_GCC_CONFIGURE_EXTRA} ${add}"
	fi
	
	rm -f "${CCDIR}/${CCNAME}/BUILD_CC_GCC_CONFIGURE_EXTRA"
fi

### Generic Build-CC extension
if [ -f "${CCDIR}/${CCNAME}/BUILD_CC_CONFIG" ]; then
	for buildCCVar in BUILD_CC_NO_LANG_CXX BUILD_CC_EXTRA_LANGUAGES; do
		buildCCVarVal="$(grep "^${buildCCVar}=" "${CCDIR}/${CCNAME}/BUILD_CC_CONFIG")" || continue
		buildCCVarVal="$(echo "${buildCCVarVal}" | cut -f 2 -d =)"
		eval "$buildCCVar=$(set | grep '^buildCCVarVal=' | sed 's@^buildCCVarVal=@@')"
	done
fi

## Determine stage of build process
STAGE="$2"

### If we have a platform tarball and a stage has not been specified, assume we are at stage 2
if [ -z "${STAGE}" ]; then
	if [ -f "${PLATFORM_TARBALL}" ]; then
544
545
546
547
548
549
550
551




552
553

554
555
556
557
558
559
560
556
557
558
559
560
561
562
563
564
565
566
567
568

569
570
571
572
573
574
575
576








+
+
+
+

-
+







			${MAKE} ${BUILD_CC_MAKE_FLAGS} install-gcc || exit 1
			${MAKE} ${BUILD_CC_MAKE_FLAGS} all-target-libgcc || exit 1
			${MAKE} ${BUILD_CC_MAKE_FLAGS} install-target-libgcc || exit 1
		else
			if [ -n "${BUILD_CC_EXTRA_LANGUAGES}" ]; then
				BUILD_CC_EXTRA_LANGUAGES=",${BUILD_CC_EXTRA_LANGUAGES}"
			fi

			if [ -z "${BUILD_CC_NO_LANG_CXX}" ]; then
				BUILD_CC_EXTRA_LANGUAGES=",c++${BUILD_CC_EXTRA_LANGUAGES}"
			fi

			### Stage 2 -- the full compiler suite
			"../${GCC_DIR}/configure" --target="${CCNAME}" --prefix="${CCDIR}" --with-headers="${CCDIR}/${CCNAME}/include" --disable-nls --enable-languages="c,c++${BUILD_CC_EXTRA_LANGUAGES}" --with-sysroot="${CCDIR}/${CCNAME}" --with-build-sysroot="${CCDIR}/${CCNAME}" --program-prefix="${CCNAME}-" --with-system-zlib ${BUILD_CC_GCC_CONFIGURE_EXTRA}
			"../${GCC_DIR}/configure" --target="${CCNAME}" --prefix="${CCDIR}" --with-headers="${CCDIR}/${CCNAME}/include" --disable-nls --enable-languages="c,${BUILD_CC_EXTRA_LANGUAGES}" --with-sysroot="${CCDIR}/${CCNAME}" --with-build-sysroot="${CCDIR}/${CCNAME}" --program-prefix="${CCNAME}-" --with-system-zlib ${BUILD_CC_GCC_CONFIGURE_EXTRA}

			${MAKE} ${BUILD_CC_MAKE_FLAGS} || exit 1
			${MAKE} ${BUILD_CC_MAKE_FLAGS} install || exit 1
		fi
	) || exit 1
)
retval="$?"

Added scripts/gcc/xtensa-esp32.











1
2
3
4
5
6
7
8
9
10
+
+
+
+
+
+
+
+
+
+
#! /usr/bin/env bash

CCNAME="$1"
CCDIR="$2"
STAGE="$4"
sourcefile="$5"

#XXX:TODO: copy XCHAL from platform .h file into gcc .h files

exit 0

Changes to scripts/post/10-zlib.

27
28
29
30
31
32
33







34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47







+
+
+
+
+
+
+







        exit 0
fi

# Only build in the final stage
if [ "${STAGE}" != "stage2" ]; then
        exit 0
fi

# Skip unusual platforms
case "${CCNAME}" in
	xtensa-esp32-elf)
		exit 0
	;;
esac

# Download source
. 'scripts/common'

if [ ! -d "${ZLIB_DIR}" ]; then
        download "${ZLIB_URL}" "${ZLIB_TARBALL}" "${ZLIB_TARBALL_SHA256}" || exit 1