From 39741128d3775d198dbee34dc827353bfd18acd8 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 17 Mar 2021 13:03:46 -0400 Subject: guix: Supply --link-profile --- depends/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'depends') diff --git a/depends/Makefile b/depends/Makefile index 4cd4d72fc2..dadb21515a 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -141,8 +141,8 @@ build_id_string+=system_clang $(host_arch)_$(host_os)_id_string+=system_clang endif -build_id_string+=GUIX_ENVIRONMENT=$(GUIX_ENVIRONMENT) -$(host_arch)_$(host_os)_id_string+=GUIX_ENVIRONMENT=$(GUIX_ENVIRONMENT) +build_id_string+=GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT)) +$(host_arch)_$(host_os)_id_string+=GUIX_ENVIRONMENT=$(realpath $(GUIX_ENVIRONMENT)) qrencode_packages_$(NO_QR) = $(qrencode_packages) -- cgit v1.2.3 From c1ae726a13ecfa5e7e9fdc3030a8110b8bb263f8 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 17 Mar 2021 13:07:40 -0400 Subject: guix: More thoroughly control native toolchain --- depends/packages/qt.mk | 3 ++- depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch (limited to 'depends') diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index ee6796e2ad..ae83eae911 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -10,7 +10,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no $(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch $(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch $(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch -$(package)_patches+= fix_bigsur_drawing.patch +$(package)_patches+= fix_bigsur_drawing.patch qtbase-moc-ignore-gcc-macro.patch $(package)_qttranslations_file_name=qttranslations-$($(package)_suffix) $(package)_qttranslations_sha256_hash=e1de58ed108b7e0a138815ea60fd46a2c4e1fc31396a707e5630e92de79c53de @@ -232,6 +232,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_bigsur_drawing.patch && \ + patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ diff --git a/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch new file mode 100644 index 0000000000..0358bea6e9 --- /dev/null +++ b/depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch @@ -0,0 +1,17 @@ +The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles +on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is +not supposed to be looking there to begin with. + +Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 + +diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp +--- a/qtbase/src/tools/moc/main.cpp ++++ b/qtbase/src/tools/moc/main.cpp +@@ -188,6 +188,7 @@ int runMoc(int argc, char **argv) + dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); + pp.macros["__attribute__"] = dummyVariadicFunctionMacro; + pp.macros["__declspec"] = dummyVariadicFunctionMacro; ++ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro; + + QString filename; + QString output; -- cgit v1.2.3 From 06d6cf6784421290e6235fe8684d5e08ed6f1b62 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 18 Mar 2021 16:20:18 -0400 Subject: depends: libdmg-hfsplus: Skip CMake RPATH patching CMake's RPATH patching apparently causes non-reproducibility in the executables which are produced, manifesting in a difference in padding in the .dynstr section (we found this while investigating non-reproducibility in the "dmg" tool). This RPATH patching can be safely skipped for executables which don't depend on internal shared libraries. Documentation sources: 1. https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling 2. https://reproducible-builds.org/docs/deterministic-build-systems/#cmake-notes Prior debugging art: 1. https://stackoverflow.com/questions/63438206/cmake-g-reproducible-build-issue-with-changing-build-path 2. https://github.com/NXPmicro/mfgtools/pull/229/files --- depends/packages/native_libdmg-hfsplus.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'depends') diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index 035b767188..f9d4b0797f 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -12,7 +12,7 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" .. + $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" -DCMAKE_SKIP_RPATH="ON" .. endef define $(package)_build_cmds -- cgit v1.2.3 From 7476b46f1893a4858616d2a8456a7c43238851ed Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 23 Mar 2021 12:59:59 -0400 Subject: guix: Build dmg as a static binary This relatively easy change eliminates all runtime dependencies (except for the kernel) for dmg, which is the only native build tool that gets put in our output tarballs. This allows much more flexibility when constructing the codesigning environment, and is much more robust. --- depends/packages/native_libdmg-hfsplus.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'depends') diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk index f9d4b0797f..c7c8adef41 100644 --- a/depends/packages/native_libdmg-hfsplus.mk +++ b/depends/packages/native_libdmg-hfsplus.mk @@ -12,7 +12,7 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" -DCMAKE_SKIP_RPATH="ON" .. + $($(package)_cmake) -DCMAKE_C_FLAGS="$$($(1)_cflags) -Wl,--build-id=none" -DCMAKE_SKIP_RPATH="ON" -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" .. endef define $(package)_build_cmds -- cgit v1.2.3