Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
aports
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Philippe Schommers
aports
Commits
02b05706
Commit
02b05706
authored
Nov 30, 2019
by
Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main/meson: upgrade to 0.52.1
parent
1d963a20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
100 deletions
+4
-100
main/meson/APKBUILD
main/meson/APKBUILD
+4
-9
main/meson/Remove-duplicated-object-files-in-static-libraries.patch
.../Remove-duplicated-object-files-in-static-libraries.patch
+0
-91
No files found.
main/meson/APKBUILD
View file @
02b05706
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname
=
meson
pkgver
=
0.52.
0
pkgrel
=
2
pkgver
=
0.52.
1
pkgrel
=
0
pkgdesc
=
"Fast and user friendly build system"
url
=
"https://mesonbuild.com"
arch
=
"noarch"
license
=
"Apache-2.0"
depends
=
"ninja py3-setuptools python3"
subpackages
=
"
$pkgname
-doc
$pkgname
-vim::noarch"
source
=
"https://github.com/mesonbuild/meson/releases/download/
$pkgver
/
$pkgname
-
$pkgver
.tar.gz
Remove-duplicated-object-files-in-static-libraries.patch
source
=
"https://github.com/mesonbuild/meson/releases/download/
$pkgver
/meson-
$pkgver
.tar.gz
"
build
()
{
cd
"
$builddir
"
python3 setup.py build
}
check
()
{
cd
"
$builddir
"
python3 setup.py check
}
package
()
{
cd
"
$builddir
"
python3 setup.py
install
--prefix
=
/usr
--root
=
"
$pkgdir
"
}
...
...
@@ -41,5 +37,4 @@ vim() {
done
}
sha512sums
=
"9efe962c60e21bf4159ce0b113caba0119751a5f6217cd116f6e43b0b4150af0eb7ab484a74d8e9438d78a5d0458dda4215e9b6b9c96bfc0d07e23d709d2929f meson-0.52.0.tar.gz
ad2361ef08fbf11b2ba55514edefbde19b01f7349f6d9b15310a7f7ed0a0206395dd5b7458cdaf8a27923f72fc271287a5525ccb64e371a3a64650f54f6f11a9 Remove-duplicated-object-files-in-static-libraries.patch"
sha512sums
=
"81e8c5897ba5311ccffc401fd514bd9a67d16caaea1f28a5c5432605766341ecd82b70c05661fbbe0c9a6006ff5ea892950bbaa548e70c3f87350438775ea6fd meson-0.52.1.tar.gz"
main/meson/Remove-duplicated-object-files-in-static-libraries.patch
deleted
100644 → 0
View file @
1d963a20
From dbc9e971bd320f3df15c1ee74f54858e6792b183 Mon Sep 17 00:00:00 2001
From: Xavier Claessens <xavier.claessens@collabora.com>
Date: Fri, 11 Oct 2019 11:01:22 -0400
Subject: [PATCH] Remove duplicated object files in static libraries
When a static library link_whole to a bunch of other static libraries,
we have to extract all their objects recursively. But that could
introduce duplicated objects. ar is dumb enough to allow this without
error, but once the resulting static library is linked into an
executable or shared library, the linker will complain about duplicated
symbols.
---
mesonbuild/backend/backends.py | 3 ++-
test cases/unit/69 static link/lib/func17.c | 4 ++++
test cases/unit/69 static link/lib/func18.c | 6 ++++++
test cases/unit/69 static link/lib/func19.c | 7 +++++++
test cases/unit/69 static link/lib/meson.build | 12 ++++++++++++
5 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 test cases/unit/69 static link/lib/func17.c
create mode 100644 test cases/unit/69 static link/lib/func18.c
create mode 100644 test cases/unit/69 static link/lib/func19.c
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 947be1cbef..e54809657f 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -281,7 +281,8 @@
def relpath(self, todir, fromdir):
os.path.join('dummyprefixdir', fromdir))
def flatten_object_list(self, target, proj_dir_to_build_root=''):
- return self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root)
+ obj_list = self._flatten_object_list(target, target.get_objects(), proj_dir_to_build_root)
+ return list(dict.fromkeys(obj_list))
def _flatten_object_list(self, target, objects, proj_dir_to_build_root):
obj_list = []
diff --git a/test cases/unit/69 static link/lib/func17.c b/test cases/unit/69 static link/lib/func17.c
new file mode 100644
index 0000000000..d1d8ec498c
--- /dev/null
+++ b/test cases/unit/69 static link/lib/func17.c
@@ -0,0 +1,4 @@
+int func17()
+{
+ return 1;
+}
diff --git a/test cases/unit/69 static link/lib/func18.c b/test cases/unit/69 static link/lib/func18.c
new file mode 100644
index 0000000000..c149085ba4
--- /dev/null
+++ b/test cases/unit/69 static link/lib/func18.c
@@ -0,0 +1,6 @@
+int func17();
+
+int func18()
+{
+ return func17() + 1;
+}
diff --git a/test cases/unit/69 static link/lib/func19.c b/test cases/unit/69 static link/lib/func19.c
new file mode 100644
index 0000000000..69120e4bf8
--- /dev/null
+++ b/test cases/unit/69 static link/lib/func19.c
@@ -0,0 +1,7 @@
+int func17();
+int func18();
+
+int func19()
+{
+ return func17() + func18();
+}
diff --git a/test cases/unit/69 static link/lib/meson.build b/test cases/unit/69 static link/lib/meson.build
index 5f04aab6a1..8f95fc4546 100644
--- a/test cases/unit/69 static link/lib/meson.build
+++ b/test cases/unit/69 static link/lib/meson.build
@@ -66,3 +66,15 @@
libfunc15 = static_library('func15', 'func15.c',
libfunc16 = static_library('func16', 'func16.c',
link_with : libfunc15,
install : true)
+
+# Verify func17.c.o gets included only once into libfunc19, otherwise
+# func19-shared would failed with duplicated symbol.
+libfunc17 = static_library('func17', 'func17.c',
+ install : false)
+libfunc18 = static_library('func18', 'func18.c',
+ link_with : libfunc17,
+ install : false)
+libfunc19 = static_library('func19', 'func19.c',
+ link_whole : [libfunc17, libfunc18],
+ install : false)
+shared_library('func19-shared', link_whole : [libfunc19])
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