Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Stéphane Adjemian
dynare
Commits
1d721da9
Verified
Commit
1d721da9
authored
2 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
macOS package: when compiling x13as, statically link libgcc, libgfortran and libquadmath
Closes: #1865
parent
755c5645
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
macOS/deps/Makefile
+12
-2
12 additions, 2 deletions
macOS/deps/Makefile
with
12 additions
and
2 deletions
macOS/deps/Makefile
+
12
−
2
View file @
1d721da9
# Copyright © 2019-202
1
Dynare Team
# Copyright © 2019-202
2
Dynare Team
#
#
# This file is part of Dynare.
# This file is part of Dynare.
#
#
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
include
versions.mk
include
versions.mk
GCC_VERSION
=
12
ROOT_PATH
=
$(
realpath
.
)
ROOT_PATH
=
$(
realpath
.
)
WGET_OPTIONS
:=
--no-verbose
--no-use-server-timestamps
--retry-connrefused
--retry-on-host-error
WGET_OPTIONS
:=
--no-verbose
--no-use-server-timestamps
--retry-connrefused
--retry-on-host-error
...
@@ -142,8 +143,17 @@ sources64/x13as-$(X13AS_VERSION): tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.
...
@@ -142,8 +143,17 @@ sources64/x13as-$(X13AS_VERSION): tarballs/x13as_asciisrc-v$(X13AS_VERSION).tar.
tar
xf
$<
--directory
$@
tar
xf
$<
--directory
$@
lib64/x13as/x13as
:
sources64/x13as-$(X13AS_VERSION)
lib64/x13as/x13as
:
sources64/x13as-$(X13AS_VERSION)
# Statically link x13as
(
see
#1865
)
.
# Using -static is not possible, it does not work under Darwin.
# Implement an ugly workaround in the absence of -static-libquadmath flag.
# In particular, gcc must be used as the linker, because gfortran does not
# honour static linking of libquadmath.
# Once the -static-libquadmath flag is added
(
GCC 13?
;
see
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46539
)
, go back to using
# gfortran as the linker with -static-libgfortran and
# -static-libquadmath flags, and drop the GCC_VERSION variable.
cd
$<
&&
sed
-i
''
's/-static//g'
makefile.gf
cd
$<
&&
sed
-i
''
's/-static//g'
makefile.gf
make
-C
$<
-f
makefile.gf
FC
=
gfortran
LINKER
=
g
fortran
FFLAGS
=
"-O2 -std=legacy"
PROGRAM
=
x13as
make
-C
$<
-f
makefile.gf
FC
=
gfortran
LINKER
=
g
cc-
$(
GCC_VERSION
)
FFLAGS
=
"-O2 -std=legacy"
LDFLAGS
=
-static-libgcc
LIBS
=
"/usr/local/lib/gcc/current/libgfortran.a /usr/local/lib/gcc/current/libquadmath.a"
PROGRAM
=
x13as
strip
$<
/x13as
strip
$<
/x13as
mkdir
-p
$(
dir
$@
)
mkdir
-p
$(
dir
$@
)
cp
$<
/x13as
$@
cp
$<
/x13as
$@
...
...
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