Skip to content

Remove gnu subdirectory #936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ jobs:
fi

# Create bundle directory
mkdir ${ARCHIVE_DIR}
mkdir -p ${ARCHIVE_DIR}
pushd ${ARCHIVE_DIR}

# Stage version file
Expand Down Expand Up @@ -1351,8 +1351,7 @@ jobs:
fi

# Stage GNU toolchains
mkdir ${ARCHIVE_DIR}/gnu
pushd ${ARCHIVE_DIR}/gnu
pushd ${ARCHIVE_DIR}

## Generate target list from the workflow matrix
TARGETS=$(echo '${{ needs.setup.outputs.targets }}' | jq -cr '.[]')
Expand Down Expand Up @@ -1381,8 +1380,10 @@ jobs:
7z a -t7z -l ${ARCHIVE_NAME}_gnu.${EXT} ${ARCHIVE_DIR}
fi

# Unstage GNU toolchain directory
rm -rf ${ARCHIVE_DIR}/gnu
# Unstage GNU toolchain directories
for TARGET in ${TARGETS}; do
rm -rf ${ARCHIVE_DIR}/${TARGET}
done

# Stage LLVM toolchains
pushd ${ARCHIVE_DIR}
Expand Down
2 changes: 1 addition & 1 deletion cmake/zephyr/gnu/generic.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR}/gnu)
set(TOOLCHAIN_HOME ${ZEPHYR_SDK_INSTALL_DIR})

set(COMPILER gcc)
set(LINKER ld)
Expand Down
4 changes: 2 additions & 2 deletions cmake/zephyr/gnu/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ set(CROSS_COMPILE_TARGET_sparc sparc-zephyr-elf)
set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
set(SYSROOT_TARGET ${CROSS_COMPILE_TARGET})

set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/gnu/${SYSROOT_TARGET}/${SYSROOT_TARGET})
set(CROSS_COMPILE ${ZEPHYR_SDK_INSTALL_DIR}/gnu/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
set(CROSS_COMPILE ${ZEPHYR_SDK_INSTALL_DIR}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)

if("${ARCH}" STREQUAL "x86")
if(CONFIG_X86_64)
Expand Down
8 changes: 2 additions & 6 deletions scripts/template_setup_posix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ check_command()
check_full_gnu_sdk()
{
for toolchain in ${gnu_toolchains[@]}; do
if [ ! -d "gnu/${toolchain}" ]; then
if [ ! -d "${toolchain}" ]; then
return 1
fi
done
Expand Down Expand Up @@ -100,7 +100,7 @@ user_prompt()
inst_gnu_toolchains=(${gnu_toolchains[*]})
else
for toolchain in ${gnu_toolchains[@]}; do
if [ ! -d "gnu/${toolchain}" ]; then
if [ ! -d "${toolchain}" ]; then
ask_yn "Install '${toolchain}' GNU toolchain" && inst_gnu_toolchains+=("${toolchain}")
fi
done
Expand Down Expand Up @@ -217,9 +217,6 @@ fi

# Install GNU toolchains
if [ "${do_gnu_toolchain}" = "y" ]; then
mkdir -p gnu
pushd gnu

for toolchain in ${inst_gnu_toolchains[@]}; do
eval toolchain_filename="${dl_gnu_toolchain_filename}"
toolchain_uri="${dl_rel_base}/${toolchain_filename}"
Expand Down Expand Up @@ -248,7 +245,6 @@ if [ "${do_gnu_toolchain}" = "y" ]; then

echo
done
popd
fi

# Install LLVM toolchain
Expand Down
8 changes: 2 additions & 6 deletions scripts/template_setup_win
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ echo.

REM # Check installation type
for %%t in (%GNU_TOOLCHAINS%) do (
if not exist gnu\%%t\ (
if not exist %%t\ (
set IS_PARTIAL_GNU_SDK=y
)
)
Expand All @@ -122,7 +122,7 @@ if [!ERRORLEVEL!] equ [1] (
set INST_GNU_TOOLCHAINS=%GNU_TOOLCHAINS%
) else (
for %%t in (%GNU_TOOLCHAINS%) do (
if not exist gnu\%%t\ (
if not exist %%t\ (
choice /c:yn /m:"Install '%%t' GNU toolchain"
if [!ERRORLEVEL!] equ [1] (
set INST_GNU_TOOLCHAINS=!INST_GNU_TOOLCHAINS! %%t
Expand All @@ -147,9 +147,6 @@ echo.
:process
REM # Install GNU toolchains
if [%DO_GNU_TOOLCHAIN%] neq [] (
if not exist gnu\ mkdir gnu
pushd gnu

for %%t in (%INST_GNU_TOOLCHAINS%) do (
set TOOLCHAIN_FILENAME=%DL_GNU_TOOLCHAIN_FILENAME%
set TOOLCHAIN_URI=%DL_REL_BASE%/!TOOLCHAIN_FILENAME!
Expand Down Expand Up @@ -178,7 +175,6 @@ if [%DO_GNU_TOOLCHAIN%] neq [] (
del /q !TOOLCHAIN_FILENAME!
)
)
popd
)

REM # Install LLVM toolchain
Expand Down
Loading