diff --git a/build/unix/stdc++compat/Makefile.in b/build/unix/stdc++compat/Makefile.in index 095039de1e9..054c1c023e2 100644 --- a/build/unix/stdc++compat/Makefile.in +++ b/build/unix/stdc++compat/Makefile.in @@ -5,6 +5,3 @@ ENABLE_CLANG_PLUGIN := include $(topsrcdir)/config/rules.mk - -CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_TARGET_VERSION) -HOST_CXXFLAGS += -DMOZ_LIBSTDCXX_VERSION=$(MOZ_LIBSTDCXX_HOST_VERSION) diff --git a/build/unix/stdc++compat/moz.build b/build/unix/stdc++compat/moz.build index 73f4e22e1d9..daccf511c6a 100644 --- a/build/unix/stdc++compat/moz.build +++ b/build/unix/stdc++compat/moz.build @@ -19,3 +19,6 @@ FORCE_STATIC_LIB = True NO_PGO = True DISABLE_STL_WRAPPING = True + +DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_TARGET_VERSION'] +HOST_DEFINES['MOZ_LIBSTDCXX_VERSION'] = CONFIG['MOZ_LIBSTDCXX_HOST_VERSION'] diff --git a/config/Makefile.in b/config/Makefile.in index 62683ac0aa8..1702e223077 100644 --- a/config/Makefile.in +++ b/config/Makefile.in @@ -41,8 +41,6 @@ endif include $(topsrcdir)/config/rules.mk -HOST_CFLAGS += -DUNICODE -D_UNICODE - ifndef JS_STANDALONE ifndef MOZ_PROFILE_USE # Generate a new buildid every time we "export" in config... that's only diff --git a/config/moz.build b/config/moz.build index 5bfb708f2fb..682626b245c 100644 --- a/config/moz.build +++ b/config/moz.build @@ -45,3 +45,8 @@ if CONFIG['GNU_CC'] and CONFIG['MOZ_OPTIMIZE']: # XXX: We should fix these warnings. ALLOW_COMPILER_WARNINGS = True + +HOST_DEFINES = { + 'UNICODE': True, + '_UNICODE': True, +} diff --git a/configure.in b/configure.in index bfaa848abc0..28ccb5b7695 100644 --- a/configure.in +++ b/configure.in @@ -1837,7 +1837,7 @@ case "$host" in HOST_CFLAGS="$HOST_CFLAGS -mwindows" fi HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -D_CRT_SECURE_NO_WARNINGS" - HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"' + HOST_NSPR_MDCPUCFG='"md/_winnt.cfg"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" HOST_BIN_SUFFIX=.exe case "$host" in @@ -1863,13 +1863,13 @@ case "$host" in *-darwin*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' + HOST_NSPR_MDCPUCFG='"md/_darwin.cfg"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ;; *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' + HOST_NSPR_MDCPUCFG='"md/_linux.cfg"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ;; diff --git a/js/src/configure.in b/js/src/configure.in index 72791fa5ce7..087ac9c3b53 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -1436,7 +1436,6 @@ case "$host" in HOST_CFLAGS="$HOST_CFLAGS -mwindows" fi HOST_CFLAGS="$HOST_CFLAGS -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -D_CRT_SECURE_NO_WARNINGS" - HOST_NSPR_MDCPUCFG='\"md/_winnt.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}" HOST_BIN_SUFFIX=.exe case "$host" in @@ -1462,13 +1461,11 @@ case "$host" in *-darwin*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ;; *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ;; @@ -3718,7 +3715,6 @@ AC_SUBST(HOST_AR) AC_SUBST(HOST_AR_FLAGS) AC_SUBST(HOST_LD) AC_SUBST(HOST_RANLIB) -AC_SUBST(HOST_NSPR_MDCPUCFG) AC_SUBST(HOST_BIN_SUFFIX) AC_SUBST(HOST_OS_ARCH) diff --git a/modules/libmar/tool/Makefile.in b/modules/libmar/tool/Makefile.in deleted file mode 100644 index 20a7c475aa0..00000000000 --- a/modules/libmar/tool/Makefile.in +++ /dev/null @@ -1,23 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 noet: -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# The mar executable is output into dist/host/bin since it is something that -# would only be used by our build system and should not itself be included in a -# Mozilla distribution. - -HOST_CFLAGS += \ - -DNO_SIGN_VERIFY \ - $(DEFINES) \ - $(NULL) - -include $(topsrcdir)/config/rules.mk - -ifdef CROSS_COMPILE -ifdef HOST_NSPR_MDCPUCFG -HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG) -CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG) -endif -endif diff --git a/modules/libmar/tool/moz.build b/modules/libmar/tool/moz.build index 122b8d28a10..5f042170303 100644 --- a/modules/libmar/tool/moz.build +++ b/modules/libmar/tool/moz.build @@ -59,3 +59,13 @@ if CONFIG['HOST_OS_ARCH'] == 'WINNT': # XXX: We should fix these warnings. ALLOW_COMPILER_WARNINGS = True + +HOST_CFLAGS += [ + #TODO: bug 1200360 - don't pass make variables here + '$(DEFINES)', +] + +HOST_DEFINES['NO_SIGN_VERIFY'] = True + +if CONFIG['CROSS_COMPILE'] and CONFIG['HOST_NSPR_MDCPUCFG']: + HOST_DEFINES['MDCPUCFG'] = CONFIG['HOST_NSPR_MDCPUCFG'] diff --git a/mozglue/linker/Makefile.in b/mozglue/linker/Makefile.in deleted file mode 100644 index a5b22176910..00000000000 --- a/mozglue/linker/Makefile.in +++ /dev/null @@ -1,16 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this file, -# You can obtain one at http://mozilla.org/MPL/2.0/. - -include $(topsrcdir)/config/rules.mk - -ifeq (arm,$(TARGET_CPU)) -ifdef MOZ_THUMB2 -HOST_CXXFLAGS += -DTARGET_THUMB -else -HOST_CXXFLAGS += -DTARGET_ARM -endif -endif -ifeq (x86,$(CPU_ARCH)) -HOST_CXXFLAGS += -DTARGET_X86 -endif diff --git a/mozglue/linker/moz.build b/mozglue/linker/moz.build index 25d71d91079..e114dc8b27a 100644 --- a/mozglue/linker/moz.build +++ b/mozglue/linker/moz.build @@ -33,3 +33,12 @@ TEST_DIRS += ['tests'] HOST_OS_LIBS += [ 'z', ] + +if CONFIG['TARGET_CPU'] == 'arm': + if CONFIG['MOZ_THUMB2']: + HOST_DEFINES['TARGET_THUMB'] = True + else: + HOST_DEFINES['TARGET_ARM'] = True + +if CONFIG['CPU_ARCH'] == 'x86': + HOST_DEFINES['TARGET_X86'] = True diff --git a/other-licenses/bsdiff/Makefile.in b/other-licenses/bsdiff/Makefile.in deleted file mode 100644 index 7d748e9181a..00000000000 --- a/other-licenses/bsdiff/Makefile.in +++ /dev/null @@ -1,30 +0,0 @@ -# vim:set ts=8 sw=8 sts=8 noet: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# Portions created by the Initial Developer are Copyright (C) 2005 -# the Initial Developer. All Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 2 or later (the "GPL"), or -# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -# in which case the provisions of the GPL or the LGPL are applicable instead -# of those above. If you wish to allow use of your version of this file only -# under the terms of either the GPL or the LGPL, and not to allow others to -# use your version of this file under the terms of the MPL, indicate your -# decision by deleting the provisions above and replace them with the notice -# and other provisions required by the GPL or the LGPL. If you do not delete -# the provisions above, a recipient may use your version of this file under -# the terms of any one of the MPL, the GPL or the LGPL. -# -# ***** END LICENSE BLOCK ***** - -# This program is output to dist/host/bin because it is only needed by the -# build system and is not intended to be included in Mozilla distributions. - -include $(topsrcdir)/config/rules.mk - -HOST_CXXFLAGS += $(MOZ_BZ2_CFLAGS) diff --git a/other-licenses/bsdiff/moz.build b/other-licenses/bsdiff/moz.build index e12a40f8853..3848e6af19f 100644 --- a/other-licenses/bsdiff/moz.build +++ b/other-licenses/bsdiff/moz.build @@ -26,3 +26,4 @@ LOCAL_INCLUDES += [ '/toolkit/mozapps/update/updater', ] +HOST_CXXFLAGS += CONFIG['MOZ_BZ2_CFLAGS'] diff --git a/toolkit/crashreporter/google-breakpad/src/common/Makefile.in b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in index 3e043e96ab6..5399134c661 100644 --- a/toolkit/crashreporter/google-breakpad/src/common/Makefile.in +++ b/toolkit/crashreporter/google-breakpad/src/common/Makefile.in @@ -2,23 +2,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -ifneq (WINNT,$(OS_TARGET)) -ifdef MOZ_CRASHREPORTER -endif -endif - ifeq ($(OS_TARGET),Android) TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/ endif -# This kind of sucks. -ifeq (Linux,$(OS_ARCH)) -HOST_CXXFLAGS += -DHAVE_A_OUT_H -OS_CXXFLAGS += -DHAVE_A_OUT_H -endif -ifeq (Darwin,$(OS_ARCH)) -HOST_CXXFLAGS += -DHAVE_MACH_O_NLIST_H -OS_CXXFLAGS += -DHAVE_MACH_O_NLIST_H -endif - include $(topsrcdir)/config/rules.mk diff --git a/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in b/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in deleted file mode 100644 index 6dc9a9b78c8..00000000000 --- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/Makefile.in +++ /dev/null @@ -1,7 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# This code is only compiled for build-time tools, -# so enabling RTTI should be fine. -HOST_CXXFLAGS += -funsigned-char -frtti diff --git a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build index 58f958beb28..353053514b3 100644 --- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build +++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build @@ -18,3 +18,11 @@ if CONFIG['MOZ_CRASHREPORTER']: # need static lib FORCE_STATIC_LIB = True + +# This code is only compiled for build-time tools, +# so enabling RTTI should be fine. +HOST_CXXFLAGS += [ + '-frtti', + '-funsigned-char', +] + diff --git a/toolkit/crashreporter/google-breakpad/src/common/moz.build b/toolkit/crashreporter/google-breakpad/src/common/moz.build index 1c69efdbe87..8e70d53e1a2 100644 --- a/toolkit/crashreporter/google-breakpad/src/common/moz.build +++ b/toolkit/crashreporter/google-breakpad/src/common/moz.build @@ -35,6 +35,8 @@ if CONFIG['OS_ARCH'] == 'Linux': 'linux/dump_symbols.cc', 'linux/elf_symbols_to_module.cc', ] + HOST_DEFINES['HAVE_A_OUT_H'] = True + DEFINES['HAVE_A_OUT_H'] = True if CONFIG['OS_TARGET'] == 'Android': pass @@ -69,6 +71,8 @@ if CONFIG['OS_ARCH'] == 'Darwin': UNIFIED_SOURCES += [ 'mac/dump_syms.mm', ] + HOST_DEFINES['HAVE_MACH_O_NLIST_H'] = True + DEFINES['HAVE_MACH_O_NLIST_H'] = True if CONFIG['OS_TARGET'] == 'Android': # We don't support unifying assembly files.