Skip to content

Commit fe23b8e

Browse files
author
deadwood
committed
Use RelWithDebInfo as configuration to be debugged under AROS hosted
1 parent 5ff4bfb commit fe23b8e

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

Diff for: Source/cmake/AROS.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ SET(CMAKE_SYSTEM_VERSION 1)
77
SET(CMAKE_CROSSCOMPILING ON)
88

99
# options
10-
SET(CMAKE_CXX_FLAGS "")
11-
SET(CMAKE_CXX_FLAGS_DEBUG "-g -gdwarf-3")
10+
SET(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Flags used by the C compiler during RELEASE builds.")
11+
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Flags used by the CXX compiler during RELEASE builds.")
1212

13-
SET(CMAKE_C_FLAGS "")
14-
SET(CMAKE_C_FLAGS_DEBUG "-g -gdwarf-3")
13+
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O1 -gdwarf -g1 -DNDEBUG -fno-exceptions -fno-strict-aliasing" CACHE STRING "Flags used by the C compiler during RELWITHDEBINFO builds.")
14+
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -gdwarf -g1 -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti" CACHE STRING "Flags used by the CXX compiler during RELWITHDEBINFO builds.")
1515

1616
SET(CMAKE_MODULE_LINKER_FLAGS "")
1717

Diff for: rebuild.sh

+23-5
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,48 @@
22

33
show_selection ()
44
{
5-
printf " 1) i386-aros\n"
6-
printf " 2) x86_64-aros\n"
5+
printf " 1) i386-aros (Release)\n"
6+
printf " 2) i386-aros (RelWithDebInfo)\n"
7+
printf " 11) x86_64-aros (Release)\n"
8+
printf " 12) x86_64-aros (RelWithDebInfo)\n"
79
}
810

911
process_selection ()
1012
{
1113
case $1 in
1214
1)
15+
;&
16+
2)
1317
BUILD_PROCESSOR=i386
1418
SDK_DIR=/ssd/deadwood/repo-github-dd-alt-abiv0/cross-$BUILD_PROCESSOR-aros/Development
1519
;;
16-
2)
20+
11)
21+
;&
22+
12)
1723
BUILD_PROCESSOR=x86_64
1824
SDK_DIR=/ssd/deadwood/repo-github-dd-core/cross-$BUILD_PROCESSOR-aros/Development
1925
;;
2026
esac
2127

28+
case $1 in
29+
1)
30+
;&
31+
11)
32+
BUILD_TYPE=Release
33+
;;
34+
2)
35+
;&
36+
12)
37+
BUILD_TYPE=RelWithDebInfo
38+
esac
39+
2240
BUILD_DIR=$(pwd)/cross-build-$BUILD_PROCESSOR-aros
2341
}
2442

2543

2644
main ()
2745
{
28-
printf "rebuild v1.0, select an option:\n"
46+
printf "rebuild v1.1, select an option:\n"
2947
printf " 0) exit\n"
3048

3149
show_selection
@@ -46,7 +64,7 @@ main ()
4664
cmake \
4765
-DCMAKE_TOOLCHAIN_FILE=../Source/cmake/AROS.cmake \
4866
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ \
49-
-DCMAKE_BUILD_TYPE=Release \
67+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
5068
-DPORT=MUI \
5169
-DCMAKE_SYSTEM_PROCESSOR=$BUILD_PROCESSOR \
5270
-DCMAKE_C_COMPILER=$BUILD_PROCESSOR-aros-gcc \

0 commit comments

Comments
 (0)