Skip to content

Commit 28b543f

Browse files
Merge branch 'arc-dev' into arc-staging
2 parents 7d46c76 + 58693d9 commit 28b543f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1260
-846
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*~
2+
_download_tmp
3+
__pycache__

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2015-11-12 Claudiu Zissulescu <[email protected]>
2+
3+
* extras/arc-tcf-gcc (processXML): Parse the C_defines field.
4+
5+
2015-10-26 Andrew Burgess <[email protected]>
6+
7+
* run-elf32-tests.sh: Use gcc-stage2 directory for gcc related
8+
testing.
9+
* run-uclibc-tests.sh: Use correct directory for running all
10+
tests.
11+
112
2015-02-27 Anton Kolesov <[email protected]>
213

314
* tag-releas.sh: Tag Linux repository.

Makefile.release

Lines changed: 113 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,23 @@
3131
# OpenOCD, however this also requires additional preparations.
3232
#
3333

34+
#
35+
# Configuration
36+
#
37+
CONFIG_STATIC_TOOLCHAIN := n
38+
39+
#
40+
# Build flags common to all toolchains
41+
#
42+
3443
BUILDALLFLAGS := --disable-werror --strip --rel-rpaths --no-auto-pull \
35-
--no-auto-checkout --config-extra '--with-python=no LDFLAGS=-static'
44+
--no-auto-checkout --elf32-strip-target-libs
45+
46+
EXTRA_CONFIG_FLAGS += --with-python=no
47+
ifeq ($(CONFIG_STATIC_TOOLCHAIN),y)
48+
EXTRA_CONFIG_FLAGS += LDFLAGS=-static
49+
endif
50+
BUILDALLFLAGS += --config-extra '$(EXTRA_CONFIG_FLAGS)'
3651

3752
#
3853
# Output artifacts
@@ -60,16 +75,17 @@ TOOLS_LINUXLE_HS_DIR_LINUX := arc_gnu_$(RELEASE)_prebuilt_uclibc_le_archs_linux_
6075
TOOLS_LINUXBE_HS_DIR_LINUX := arc_gnu_$(RELEASE)_prebuilt_uclibc_be_archs_linux_install
6176

6277
# IDE: vanilla Eclipse variables
63-
ECLIPSE_VERSION := luna-SR2
78+
ECLIPSE_VERSION := mars-1
6479
ECLIPSE_VANILLA_ZIP_WIN := eclipse-cpp-$(ECLIPSE_VERSION)-win32.zip
6580
ECLIPSE_VANILLA_TGZ_LINUX := eclipse-cpp-$(ECLIPSE_VERSION)-linux-gtk-x86_64.tar.gz
6681
# Coma separated list
6782
ECLIPSE_REPO := http://download.eclipse.org/releases/luna
6883
# Coma separated list
6984
ECLIPSE_PREREQ := org.eclipse.tm.terminal.serial,org.eclipse.tm.terminal.view
70-
ECLIPSE_DL_LINK_BASE := http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR2
85+
ECLIPSE_DL_LINK_BASE := http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/1
7186
# IDE: output related variables
7287
IDE_INSTALL_LINUX := arc_gnu_$(RELEASE)_ide_linux_install
88+
IDE_EXE_WIN := arc_gnu_$(RELEASE)_ide_win32_install.exe
7389
IDE_TGZ_LINUX := $(IDE_INSTALL_LINUX).tar.gz
7490
IDE_PLUGINS_DIR := arc_gnu_$(RELEASE)_ide_plugins
7591
IDE_PLUGINS_ZIP := $(IDE_PLUGINS_DIR).zip
@@ -83,10 +99,30 @@ OOCD_SRC_DIR_LINUX := ../openocd
8399
# md5sum
84100
MD5SUM_FILE := md5.sum
85101

102+
#
103+
# Check prerequisite variables
104+
#
86105
ifeq ($(RELEASE),)
87106
$(error RELEASE variable can not be empty)
88107
endif
89108

109+
ifneq ($(filter upload create-tag push-tag, $(MAKECMDGOALS)),)
110+
ifeq ($(RELEASE_TAG),)
111+
$(error RELEASE_TAG variable can not be empty for this target)
112+
endif
113+
endif
114+
115+
ifneq ($(filter upload, $(MAKECMDGOALS)),)
116+
ifeq ($(RELEASE_NAME),)
117+
$(error RELEASE_NAME variable can not be empty for "upload" target)
118+
endif
119+
endif
120+
121+
#
122+
# Configuration
123+
#
124+
PYTHON = /depot/Python-3.4.3/bin/python3
125+
90126
#
91127
# Human friendly aliases
92128
#
@@ -175,19 +211,23 @@ $O/.stamp_linux_le_700_built: $O/.stamp_checked_out
175211
--no-elf32 --release-name $(RELEASE) --cpu arc700
176212
touch $@
177213

178-
$O/.stamp_linux_le_hs_built: $O/.stamp_checked_out
214+
$O/.stamp_linux_le_hs_built: $O/.stamp_linux_le_700_built $O/.stamp_checked_out
179215
./build-all.sh $(BUILDALLFLAGS) --install-dir $O/$(TOOLS_LINUXLE_HS_DIR_LINUX) \
180216
--no-elf32 --release-name $(RELEASE) --cpu archs
217+
cp -al $O/$(TOOLS_LINUXLE_700_DIR_LINUX)/arc-snps-linux-uclibc/sysroot \
218+
$O/$(TOOLS_LINUXLE_HS_DIR_LINUX)/arc-snps-linux-uclibc/sysroot-arc700
181219
touch $@
182220

183221
$O/.stamp_linux_be_700_built: $O/.stamp_checked_out
184222
./build-all.sh $(BUILDALLFLAGS) --install-dir $O/$(TOOLS_LINUXBE_700_DIR_LINUX) \
185223
--no-elf32 --release-name $(RELEASE) --big-endian --cpu arc700
186224
touch $@
187225

188-
$O/.stamp_linux_be_hs_built: $O/.stamp_checked_out
226+
$O/.stamp_linux_be_hs_built: $O/.stamp_linux_be_700_built $O/.stamp_checked_out
189227
./build-all.sh $(BUILDALLFLAGS) --install-dir $O/$(TOOLS_LINUXBE_HS_DIR_LINUX) \
190228
--no-elf32 --release-name $(RELEASE) --big-endian --cpu archs
229+
cp -al $O/$(TOOLS_LINUXBE_700_DIR_LINUX)/arceb-snps-linux-uclibc/sysroot \
230+
$O/$(TOOLS_LINUXBE_HS_DIR_LINUX)/arceb-snps-linux-uclibc/sysroot-arc700
191231
touch $@
192232

193233
$O/.stamp_linux_le_700_tarball: $O/.stamp_linux_le_700_built
@@ -213,29 +253,49 @@ $O/.stamp_linux_be_hs_tarball: $O/.stamp_linux_be_hs_built
213253
#
214254
# Windows build
215255
#
256+
257+
WINDOWS_TRIPLET := i686-w64-mingw32
258+
WINDOWS_SYSROOT := /usr/$(WINDOWS_TRIPLET)/sys-root/mingw
259+
260+
# Helper function to copy mingw .dll files to installation directories with
261+
# executable files. There are several directories and for simplicity all .dlls
262+
# are copied to all target location.
263+
#
264+
# :param $1 - toolchain installation directory, e.g. $O/$(TOOLS_ELFLE_DIR_WIN).
265+
# :param $2 - toolchain triplet, e.g. arc-elf32, arceb-elf32, etc.
266+
ifneq ($(CONFIG_STATIC_TOOLCHAIN),y)
267+
define copy_mingw_dlls
268+
for t in $(addprefix $1/,bin $2/bin libexec/gcc/$2/*/); do\
269+
cp -a $(WINDOWS_SYSROOT)/bin/* $$t ; \
270+
done
271+
endef
272+
endif
273+
216274
$O/.stamp_elf_le_windows_built: $O/.stamp_checked_out $O/.stamp_elf_le_built
217275
PATH=$(shell readlink -e $O/$(TOOLS_ELFLE_DIR_LINUX)/bin):$$PATH \
218276
./build-all.sh $(BUILDALLFLAGS) \
219277
--install-dir $O/$(TOOLS_ELFLE_DIR_WIN) --no-uclibc --no-sim \
220-
--release-name $(RELEASE) --host i686-w64-mingw32 --no-system-expat
278+
--release-name $(RELEASE) --host $(WINDOWS_TRIPLET) --no-system-expat \
279+
--no-elf32-gcc-stage1
280+
$(call copy_mingw_dlls,$O/$(TOOLS_ELFLE_DIR_WIN),arc-elf32)
221281
touch $@
222282

223283
$O/.stamp_elf_be_windows_built: $O/.stamp_checked_out $O/.stamp_elf_be_built
224284
# Install toolchain in the same dir as little endian
225285
PATH=$(shell readlink -e $O/$(TOOLS_ELFBE_DIR_LINUX))/bin:$$PATH \
226286
./build-all.sh $(BUILDALLFLAGS) \
227287
--install-dir $O/$(TOOLS_ELFBE_DIR_WIN) --no-uclibc --big-endian --no-sim \
228-
--release-name $(RELEASE) --host i686-w64-mingw32 --no-system-expat
288+
--release-name $(RELEASE) --host $(WINDOWS_TRIPLET) --no-system-expat \
289+
--no-elf32-gcc-stage1
290+
$(call copy_mingw_dlls,$O/$(TOOLS_ELFBE_DIR_WIN),arceb-elf32)
229291
touch $@
230292

231293
$O/.stamp_elf_le_windows_tarball: $O/.stamp_elf_le_windows_built
232294
cd $O && tar czf $(TOOLS_ELFLE_DIR_WIN)$(TAR_EXT) $(TOOLS_ELFLE_DIR_WIN)/
233-
cd $O && zip -q -r $(TOOLS_ELFLE_DIR_WIN).zip $(TOOLS_ELFLE_DIR_WIN)/
234295
touch $@
235296

236297
$O/.stamp_elf_be_windows_tarball: $O/.stamp_elf_be_windows_built
237298
cd $O && tar czf $(TOOLS_ELFBE_DIR_WIN)$(TAR_EXT) $(TOOLS_ELFBE_DIR_WIN)/
238-
cd $O && zip -q -r $(TOOLS_ELFBE_DIR_WIN).zip $(TOOLS_ELFBE_DIR_WIN)/
239299
touch $@
240300

241301
#
@@ -250,29 +310,33 @@ $O/$(ECLIPSE_VANILLA_TGZ_LINUX):
250310
$O/$(ECLIPSE_VANILLA_ZIP_WIN):
251311
wget -nv -O $@ '$(ECLIPSE_DL_LINK_BASE)/$(ECLIPSE_VANILLA_ZIP_WIN)&r=1'
252312

253-
$O/.stamp_ide_linux_eclipse: $O/$(ECLIPSE_VANILLA_TGZ_LINUX)
313+
$O/.stamp_ide_linux_eclipse: $O/$(ECLIPSE_VANILLA_TGZ_LINUX) $O/$(IDE_PLUGINS_DIR)
254314
mkdir -p $O/$(IDE_INSTALL_LINUX)
255315
tar xaf $< -C $O/$(IDE_INSTALL_LINUX)
256316
$O/$(IDE_INSTALL_LINUX)/eclipse/eclipse \
257317
-application org.eclipse.equinox.p2.director \
258318
-noSplash \
259319
-repository $(ECLIPSE_REPO),file://$(realpath $O/$(IDE_PLUGINS_DIR)) \
260320
-installIU $(ECLIPSE_PREREQ),com.arc.cdt.feature.feature.group
321+
# Eclipse will create a bunch of repos with local paths, that will not
322+
# work for end-users, hence those repos must be manually removed.
323+
sed -i -e "/$(subst /,_,$O)/ d" \
324+
$O/$(IDE_INSTALL_LINUX)/eclipse/p2/org.eclipse.equinox.p2.engine/profileRegistry/epp.package.cpp.profile/.data/.settings/org.eclipse.equinox.p2.*
261325
touch $@
262326

263327
$O/.stamp_ide_linux_tar: \
264328
$O/$(OOCD_DIR_LINUX)/bin/openocd \
265329
$O/.stamp_ide_linux_eclipse \
266330
$O/.stamp_elf_be_built $O/.stamp_elf_le_built \
267331
$O/.stamp_linux_be_hs_built $O/.stamp_linux_le_hs_built
268-
cp -ad $O/$(TOOLS_ELFLE_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
269-
cp -ad $O/$(TOOLS_ELFBE_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
270-
cp -ad $O/$(TOOLS_LINUXLE_HS_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
271-
cp -ad $O/$(TOOLS_LINUXBE_HS_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
332+
cp -al $O/$(TOOLS_ELFLE_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
333+
cp -al $O/$(TOOLS_ELFBE_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
334+
cp -al $O/$(TOOLS_LINUXLE_HS_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
335+
cp -al $O/$(TOOLS_LINUXBE_HS_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
272336
mkdir $O/$(IDE_INSTALL_LINUX)/eclipse/jre
273337
tar xaf $O/jre-*-linux-x64.tar.gz -C $O/$(IDE_INSTALL_LINUX)/eclipse/jre \
274338
--strip-components=1
275-
cp -ad $O/$(OOCD_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
339+
cp -al $O/$(OOCD_DIR_LINUX)/* $O/$(IDE_INSTALL_LINUX)
276340
tar caf $O/$(IDE_TGZ_LINUX) -C $O $(IDE_INSTALL_LINUX)
277341
touch $@
278342

@@ -312,6 +376,40 @@ $O/$(OOCD_DIR_WIN).zip: $O/$(OOCD_DIR_WIN)
312376
$O/$(OOCD_DIR_WIN).tar.gz: $O/$(OOCD_DIR_WIN)
313377
tar -C $O -caf $O/$(OOCD_DIR_WIN).tar.gz $(OOCD_DIR_WIN)/
314378

379+
#
380+
# Create tag
381+
#
382+
create-tag:
383+
./tag-release.sh $(RELEASE_TAG)
384+
385+
#
386+
# Push tag
387+
#
388+
push-tag:
389+
./push-release.sh $(RELEASE_TAG)
390+
391+
#
392+
# Upload
393+
#
394+
# This is not a part of a default target. Upload should be triggered manually.
395+
# RELEASE_TAG and RELEASE_NAME mustbe set to something
396+
upload:
397+
$(PYTHON) github/create-release.py --owner=foss-for-synopsys-dwc-arc-processors \
398+
--project=toolchain --tag=$(RELEASE_TAG) --draft \
399+
--name="$(RELEASE_NAME)" \
400+
--prerelease --oauth-token=$(shell cat ~/.github_oauth_token) \
401+
--md5sum-file=$O/$(MD5SUM_FILE) \
402+
$O/$(TOOLS_ELFLE_DIR_LINUX)$(TAR_EXT) \
403+
$O/$(TOOLS_ELFBE_DIR_LINUX)$(TAR_EXT) \
404+
$O/$(TOOLS_LINUXLE_700_DIR_LINUX)$(TAR_EXT) \
405+
$O/$(TOOLS_LINUXBE_700_DIR_LINUX)$(TAR_EXT) \
406+
$O/$(TOOLS_LINUXLE_HS_DIR_LINUX)$(TAR_EXT) \
407+
$O/$(TOOLS_LINUXBE_HS_DIR_LINUX)$(TAR_EXT) \
408+
$O/$(TOOLS_SOURCE_DIR)$(TAR_EXT) \
409+
$O/$(IDE_PLUGINS_ZIP) \
410+
$O/$(IDE_TGZ_LINUX) \
411+
$O/$(IDE_EXE_WIN)
412+
315413
#
316414
# Clean
317415
#

0 commit comments

Comments
 (0)