Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
1120289f
Commit
1120289f
authored
Jan 24, 2013
by
Alexander Smorkalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler and linker flags for arm cross compilation fixed.
parent
3ed99b77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
6 deletions
+46
-6
arm-gnueabi-hardfp.toolchain.cmake
platforms/linux/arm-gnueabi-hardfp.toolchain.cmake
+23
-3
arm-gnueabi-softfp.toolchain.cmake
platforms/linux/arm-gnueabi-softfp.toolchain.cmake
+23
-3
No files found.
platforms/linux/arm-gnueabi-hardfp.toolchain.cmake
View file @
1120289f
...
...
@@ -5,9 +5,29 @@ set(CMAKE_SYSTEM_PROCESSOR arm)
set
(
CMAKE_C_COMPILER arm-linux-gnueabihf-gcc-4.6
)
set
(
CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++-4.6
)
#suppress compiller varning
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-psabi"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-psabi"
)
set
(
CMAKE_CXX_FLAGS
""
CACHE STRING
"c++ flags"
)
set
(
CMAKE_C_FLAGS
""
CACHE STRING
"c flags"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
""
CACHE STRING
"shared linker flags"
)
set
(
CMAKE_MODULE_LINKER_FLAGS
""
CACHE STRING
"module linker flags"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-Wl,-z,nocopyreloc"
CACHE STRING
"executable linker flags"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_SHARED_LINKER_FLAGS
}
"
)
set
(
CMAKE_MODULE_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_MODULE_LINKER_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_EXE_LINKER_FLAGS
}
"
)
if
(
USE_NEON
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=neon"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=neon"
)
elseif
(
USE_VFPV3
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3"
)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3-d16"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3-d16"
)
endif
()
# can be any other plases
set
(
ARM_LINUX_SYSROOT /usr/arm-linux-gnueabihf CACHE PATH
"ARM cross compilation system root"
)
...
...
platforms/linux/arm-gnueabi-softfp.toolchain.cmake
View file @
1120289f
...
...
@@ -5,9 +5,29 @@ set(CMAKE_SYSTEM_PROCESSOR arm)
set
(
CMAKE_C_COMPILER arm-linux-gnueabi-gcc-4.6
)
set
(
CMAKE_CXX_COMPILER arm-linux-gnueabi-g++-4.6
)
#suppress compiller varning
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-psabi"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-psabi"
)
set
(
CMAKE_CXX_FLAGS
""
CACHE STRING
"c++ flags"
)
set
(
CMAKE_C_FLAGS
""
CACHE STRING
"c flags"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
""
CACHE STRING
"shared linker flags"
)
set
(
CMAKE_MODULE_LINKER_FLAGS
""
CACHE STRING
"module linker flags"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-Wl,-z,nocopyreloc"
CACHE STRING
"executable linker flags"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mthumb -fdata-sections -Wa,--noexecstack -fsigned-char -Wno-psabi"
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_SHARED_LINKER_FLAGS
}
"
)
set
(
CMAKE_MODULE_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_MODULE_LINKER_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"-Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now
${
CMAKE_EXE_LINKER_FLAGS
}
"
)
if
(
USE_NEON
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=neon"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=neon"
)
elseif
(
USE_VFPV3
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3"
)
else
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-mfpu=vfpv3-d16"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-mfpu=vfpv3-d16"
)
endif
()
# can be any other plases
set
(
ARM_LINUX_SYSROOT /usr/arm-linux-gnueabi CACHE PATH
"ARM cross compilation system root"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment