Fix GNU GCC C++ 4.9 detection on macOS. Fixes #78. Closes #101.

Rename "Mac OS" to "macOS"
This commit is contained in:
Eloston
2016-10-17 17:16:19 -07:00
parent b4a9b9eda3
commit 886d7d0f1b
6 changed files with 13 additions and 15 deletions

View File

@@ -77,11 +77,11 @@ See `build.py` for more on customizing the build environment or process.
# Change directory to ungoogled-chromium's root directory
path\to\python3 build.py
## Mac OS
## macOS
**NOTE: There is no official maintainer for this platform. If there is a problem, please submit a pull request or issue**
Tested on Mac OS 10.11.6
Tested on macOS 10.11.6
Credits to [9Morello](//github.com/9Morello) for most of the work done on this platform.

View File

@@ -66,7 +66,7 @@ In addition to features from [Debian](//tracker.debian.org/pkg/chromium-browser)
* Debian
* Ubuntu
* Windows
* Mac OS
* macOS
## Download pre-built packages

View File

@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with ungoogled-chromium. If not, see <http://www.gnu.org/licenses/>.
'''Code for Mac OS'''
'''Code for macOS'''
import tempfile
import pathlib
@@ -28,7 +28,7 @@ from ._util import BuilderException
from .common import Builder, PATCHES, PATCH_ORDER
class MacOSBuilder(Builder):
'''Builder for Mac OS'''
'''Builder for macOS'''
_resources = pathlib.Path("resources", "macos")
@@ -67,13 +67,11 @@ class MacOSBuilder(Builder):
raise BuilderException("Could not find command 'libtool' in PATH variable")
self.logger.debug("Found libtool at '{!s}'".format(libtool_path))
self.logger.info("Checking compilers...")
compiler_list = [ # TODO: Move these paths to another config file?
"/usr/local/Cellar/gcc49/4.9.3/bin/x86_64-apple-darwin15.4.0-c++-4.9"]
for compiler in compiler_list:
if not pathlib.Path(compiler).is_file():
raise BuilderException("Compiler '{}' does not exist or is not a file".format(
compiler))
# TODO: Maybe add check for macOS SDK version
self.logger.info("Checking g++ compiler for building libc++...")
if not pathlib.Path(shutil.which("g++-4.9")).is_file():
raise BuilderException("GNU compiler '{}' does not exist or is not a file".format(
compiler))
def apply_patches(self):
self.logger.debug("Copying patches to {}...".format(str(self.build_dir / PATCHES)))

View File

@@ -1,4 +1,4 @@
# Disable symbol order verification on Mac OS since building libc++.a adds extra symbols for some reason
# Disable symbol order verification on macOS since building libc++.a adds extra symbols for some reason
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi

View File

@@ -1,4 +1,4 @@
# Disable treating warnings as errors on Mac OS
# Disable treating warnings as errors on macOS
--- a/build/common.gypi
+++ b/build/common.gypi

View File

@@ -7,7 +7,7 @@
# redeclarations.
#CXX="$THIS_DIR/../llvm-build/Release+Asserts/bin/clang++"
-CXX=c++
+CXX=/usr/local/Cellar/gcc49/4.9.3/bin/x86_64-apple-darwin15.4.0-c++-4.9
+CXX=g++-4.9
-FLAGS="-nostdinc++ -O3 -std=c++11 -fstrict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.6 -arch i386 -arch x86_64 -isysroot $(xcrun -show-sdk-path)"