Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | A bit more work to ensure that some flags are preserved until the right stage | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | 
033a6f4cd4de6a5de1820aa89123aa91 | 
| User & Date: | rkeene 2019-05-10 17:08:56 | 
Context
| 
   2023-10-06 
 | ||
| 19:40 | Many updates check-in: 71230f71d0 user: rkeene tags: trunk | |
| 
   2019-05-10 
 | ||
| 17:08 | A bit more work to ensure that some flags are preserved until the right stage check-in: 033a6f4cd4 user: rkeene tags: trunk | |
| 
   2019-05-09 
 | ||
| 23:10 | Make sure when overwriting files we have permission to do so check-in: 019ff6c17d user: rkeene tags: trunk | |
Changes
Changes to build-cc.
| ︙ | ︙ | |||
315 316 317 318 319 320 321  | 
	if [ -f "${ADDONS_TARBALL}" ]; then
		bzip2 -dc "${ADDONS_TARBALL}" | "${TAR:-tar}" --keep-old-files -xf - >/dev/null 2>/dev/null
		fixPerms='true'
	fi
	if [ "${fixPerms}" = 'true' ]; then
 | | | < < < < < < < < < < < < < < < < < < <  | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332  | 
	if [ -f "${ADDONS_TARBALL}" ]; then
		bzip2 -dc "${ADDONS_TARBALL}" | "${TAR:-tar}" --keep-old-files -xf - >/dev/null 2>/dev/null
		fixPerms='true'
	fi
	if [ "${fixPerms}" = 'true' ]; then
		find . -type d -exec chmod u+rwx '{}' ';'
		find . -type f -exec chmod u+rw '{}' ';'
	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
 | 
| ︙ | ︙ | |||
360 361 362 363 364 365 366 367 368 369 370 371 372 373  | 
fi
### Normalize stage names
if [ "${STAGE}" != "stage1" ]; then
	STAGE="stage2"
fi
export STAGE
# Determine flags for this build, to pass to sub-scripts
FLAGS=''
if [ "${use_multilib}" = '1' ]; then
	FLAGS="${FLAGS} multilib"
fi
 | > > > > > > > > > > > > > > > > > > > > > > > >  | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378  | 
fi
### Normalize stage names
if [ "${STAGE}" != "stage1" ]; then
	STAGE="stage2"
fi
export STAGE
### Set use_multilib authoritatively if possible
if [ -f "${CCDIR}/${CCNAME}/multilib" ]; then
	use_multilib="$(cat "${CCDIR}/${CCNAME}/multilib")"
	if [ "${STAGE}" = 'stage2' ]; then
		rm -f "${CCDIR}/${CCNAME}/multilib"
	fi
fi
### Set C compiler flags from tarball
if [ -f "${CCDIR}/${CCNAME}/BUILD_CC_GCC_CONFIGURE_EXTRA" ]; then
	add="$(cat "${CCDIR}/${CCNAME}/BUILD_CC_GCC_CONFIGURE_EXTRA")"
	#### Ensure these flags aren't malicious
	##### 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
	
	if [ "${STAGE}" = 'stage2' ]; then
		rm -f "${CCDIR}/${CCNAME}/BUILD_CC_GCC_CONFIGURE_EXTRA"
	fi
fi
# Determine flags for this build, to pass to sub-scripts
FLAGS=''
if [ "${use_multilib}" = '1' ]; then
	FLAGS="${FLAGS} multilib"
fi
 | 
| ︙ | ︙ |