Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
0e26cf84
Commit
0e26cf84
authored
7 years ago
by
Sebastian Meiling
Browse files
Options
Downloads
Patches
Plain Diff
pkg/relic: adapt cmake xcompile on macOS
parent
3ad07c6a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pkg/relic/Makefile
+13
-7
13 additions, 7 deletions
pkg/relic/Makefile
pkg/relic/generate-cmake-xcompile.perl
+0
-29
0 additions, 29 deletions
pkg/relic/generate-cmake-xcompile.perl
with
13 additions
and
36 deletions
pkg/relic/Makefile
+
13
−
7
View file @
0e26cf84
...
...
@@ -5,17 +5,22 @@ PKG_LICENSE=LGPL-2.1
.PHONY
:
all
CFLAGS
+=
-Wno-gnu-zero-variadic-macro-arguments
-Wno-unused-function
-Wno-newline-eof
TOOLCHAIN_FILE
=
$(
PKG_BUILDDIR
)
/xcompile-toolchain.cmake
all
:
$(PKG_BUILDDIR)/Makefile
"
$(
MAKE
)
"
-C
$(
PKG_BUILDDIR
)
&&
\
$(
MAKE
)
-C
$(
PKG_BUILDDIR
)
&&
\
cp
$(
PKG_BUILDDIR
)
/lib/librelic_s.a
$(
BINDIR
)
/
$(
PKG_NAME
)
.a
$(PKG_BUILDDIR)/comp-options.cmake
:
fix_source
cd
"
$(
PKG_BUILDDIR
)
"
&&
perl
$(
PKG_DIR
)
/generate-cmake-xcompile.perl
>
comp-options.cmake
$(PKG_BUILDDIR)/Makefile
:
$(TOOLCHAIN_FILE)
cd
$(
PKG_BUILDDIR
)
&&
\
COMP
=
"
$(
filter-out -Werror=old-style-definition -Werror=strict-prototypes,
$(
CFLAGS
)
)
"
\
cmake
-DCMAKE_TOOLCHAIN_FILE
=
$(
TOOLCHAIN_FILE
)
\
-DCHECK
=
off
-DTESTS
=
0
-DBENCH
=
0
-DSHLIB
=
off
-Wno-dev
$(
RELIC_CONFIG_FLAGS
)
.
$(PKG_BUILDDIR)/Makefile
:
$(PKG_BUILDDIR)/comp-options.cmake
cd
"
$(
PKG_BUILDDIR
)
"
&&
COMP
=
"
$(
filter-out -Werror=old-style-definition -Werror=strict-prototypes,
$(
CFLAGS
)
)
"
cmake
-DCMAKE_TOOLCHAIN_FILE
=
comp-options.cmake
-DCHECK
=
off
-DTESTS
=
0
-DBENCH
=
0
-DSHLIB
=
off
-Wno-dev
$(
RELIC_CONFIG_FLAGS
)
.
CFLAGS
+=
-Wno-gnu-zero-variadic-macro-arguments
-Wno-unused-function
-Wno-newline-eof
$(TOOLCHAIN_FILE)
:
fix_source
$(
RIOTBASE
)
/dist/tools/cmake/generate-xcompile-toolchain.sh
>
$(
TOOLCHAIN_FILE
)
fix_source
:
git-download
./fix-util_print_wo_args.sh
$(
PKG_BUILDDIR
)
...
...
@@ -23,4 +28,5 @@ fix_source: git-download
clean
::
@
rm
-rf
$(
BINDIR
)
/
$(
PKG_NAME
)
.a
include
$(RIOTBASE)/pkg/pkg.mk
This diff is collapsed.
Click to expand it.
pkg/relic/generate-cmake-xcompile.perl
deleted
100755 → 0
+
0
−
29
View file @
3ad07c6a
#!/usr/bin/env perl
print
"
INCLUDE(CMakeForceCompiler)
\n
";
print
"
\n
";
print
"
\n
";
print
"
SET(CMAKE_SYSTEM_NAME Generic)
\n
";
print
"
SET(CMAKE_SYSTEM_VERSION 1)
\n
";
print
"
\n
";
print
"
SET(CMAKE_C_COMPILER
\"
$ENV
{CC}
\"
CACHE STRING
\"\"
)
\n
";
print
"
SET(CMAKE_CXX_COMPILER
\"
$ENV
{CXX}
\"
CACHE STRING
\"\"
)
\n
";
print
"
SET(CMAKE_RANLIB
\"
echo
\"
CACHE STRING
\"\"
)
\n
";
print
"
\n
";
print
"
# specify the cross compiler
\n
";
print
"
CMAKE_FORCE_C_COMPILER(
\$
{CMAKE_C_COMPILER} GNU)
\n
";
print
"
CMAKE_FORCE_CXX_COMPILER(
\$
{CMAKE_CXX_COMPILER} GNU)
\n
";
print
"
SET(CMAKE_LINKER
\"
$ENV
{LINK}
\"
CACHE STRING
\"\"
)
\n
";
print
"
\n
";
my
$esc_c_flags
=
"
$ENV
{CFLAGS}
";
$esc_c_flags
=~
s/"/\\"/g
;
print
"
SET(CMAKE_C_FLAGS
\"
$esc_c_flags
\"
CACHE STRING
\"\"
)
\n
";
print
"
\n
";
print
"
SET(CMAKE_EXE_LINKER_FLAGS
\"
$ENV
{LINKFLAGS}
\"
CACHE STRING
\"\"
)
\n
";
print
"
\n
";
print
"
# search for programs in the build host directories
\n
";
print
"
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
\n
";
print
"
# for libraries and headers in the target directories
\n
";
print
"
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
\n
";
print
"
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
\n
";
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment