Skip to content

Commit

Permalink
fixed Docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensElflein committed Nov 6, 2024
1 parent a43400b commit 3d40220
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS ON
)

target_compile_options(${CMAKE_PROJECT_NAME} PUBLIC -Wall -Wextra -Werror)


# Add lib subdirectory
add_subdirectory(ext)

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ FROM ubuntu:22.04 AS builder
LABEL authors="Clemens Elflein"

RUN apt-get update && apt-get install -y \
gcc-arm-none-eabi \
gcc-arm-none-eabi git \
libasio-dev iproute2 \
python3 python3-venv python3-pip \
cmake \
make \
&& rm -rf /var/lib/apt/lists/*
Expand Down
4 changes: 2 additions & 2 deletions cmake/gcc-arm-none-eabi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ add_compile_definitions(CORTEX_USE_FPU=TRUE)
set(TARGET_FLAGS "-mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -falign-functions=16 -mthumb -fno-common -flto")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wpedantic -fdata-sections -ffunction-sections")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdata-sections -ffunction-sections")
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g3 -DDEBUG_BUILD")
endif()
Expand All @@ -36,7 +36,7 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
endif()

set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -x assembler-with-cpp -MMD -MP")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions -fno-threadsafe-statics")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fno-rtti -fno-exceptions -fno-threadsafe-statics -Wno-volatile")

set(CMAKE_C_LINK_FLAGS "${TARGET_FLAGS}")
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --specs=nosys.specs")
Expand Down
2 changes: 1 addition & 1 deletion ext/xbot_framework

0 comments on commit 3d40220

Please sign in to comment.