aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-09-13 10:00:26 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-13 10:00:26 +0200
commit663628e38dd16a29e074f472065b27a9c9a823d0 (patch)
tree7ac2953213b1410b97531c8b06e306aa5b523070 /gcc
parent1946ddadbbaa160a778334a9a82d93b216bd6c85 (diff)
downloadgcc-663628e38dd16a29e074f472065b27a9c9a823d0.zip
gcc-663628e38dd16a29e074f472065b27a9c9a823d0.tar.gz
gcc-663628e38dd16a29e074f472065b27a9c9a823d0.tar.bz2
Minor edits.
From-SVN: r252060
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/adaint.h2
-rw-r--r--gcc/ada/ctrl_c.c2
-rw-r--r--gcc/ada/gsocket.h2
-rw-r--r--gcc/ada/init.c2
-rw-r--r--gcc/ada/initialize.c2
-rw-r--r--gcc/ada/libgnarl/a-taster.adb2
-rw-r--r--gcc/ada/link.c2
-rw-r--r--gcc/ada/rtfinal.c2
-rw-r--r--gcc/ada/s-oscons-tmplt.c2
-rw-r--r--gcc/ada/vx_crtbegin.c2
-rw-r--r--gcc/ada/vx_crtbegin.inc2
-rw-r--r--gcc/ada/vx_crtbegin_auto.c6
-rw-r--r--gcc/ada/vx_crtend.c2
13 files changed, 17 insertions, 13 deletions
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 444e04d..028ffbf 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2016, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/ctrl_c.c b/gcc/ada/ctrl_c.c
index b1bd085..46d259e 100644
--- a/gcc/ada/ctrl_c.c
+++ b/gcc/ada/ctrl_c.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2002-2013, Free Software Foundation, Inc. *
+ * Copyright (C) 2002-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/gsocket.h b/gcc/ada/gsocket.h
index b343b09..b4b7f20a8 100644
--- a/gcc/ada/gsocket.h
+++ b/gcc/ada/gsocket.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 2004-2016, Free Software Foundation, Inc. *
+ * Copyright (C) 2004-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index e180f3c..4071bb4 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2016, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c
index 54e7e8b..f2228a6 100644
--- a/gcc/ada/initialize.c
+++ b/gcc/ada/initialize.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2015, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/libgnarl/a-taster.adb b/gcc/ada/libgnarl/a-taster.adb
index c4b4aaa..844d8aa 100644
--- a/gcc/ada/libgnarl/a-taster.adb
+++ b/gcc/ada/libgnarl/a-taster.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2005-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2005-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index 9e33a84..ac3c372 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2015, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2017, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/rtfinal.c b/gcc/ada/rtfinal.c
index 0500964..8f7e163 100644
--- a/gcc/ada/rtfinal.c
+++ b/gcc/ada/rtfinal.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2014-2015, Free Software Foundation, Inc. *
+ * Copyright (C) 2014, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
index 2614017..0ace0b6 100644
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/gcc/ada/s-oscons-tmplt.c
@@ -7,7 +7,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2000-2016, Free Software Foundation, Inc. --
+-- Copyright (C) 2000-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
diff --git a/gcc/ada/vx_crtbegin.c b/gcc/ada/vx_crtbegin.c
index c4628ee..82c2993 100644
--- a/gcc/ada/vx_crtbegin.c
+++ b/gcc/ada/vx_crtbegin.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2017, Free Software Foundation, Inc. *
+ * Copyright (C) 2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/vx_crtbegin.inc b/gcc/ada/vx_crtbegin.inc
index fea12c1..111310b 100644
--- a/gcc/ada/vx_crtbegin.inc
+++ b/gcc/ada/vx_crtbegin.inc
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2017, Free Software Foundation, Inc. *
+ * Copyright (C) 2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
diff --git a/gcc/ada/vx_crtbegin_auto.c b/gcc/ada/vx_crtbegin_auto.c
index 304a6dd..277c93b 100644
--- a/gcc/ada/vx_crtbegin_auto.c
+++ b/gcc/ada/vx_crtbegin_auto.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2017, Free Software Foundation, Inc. *
+ * Copyright (C) 2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -39,6 +39,10 @@
#define CDTOR_VISIBILITY static
#include "vx_crtbegin.inc"
+/* Diab C++ for ppc64-vx7 crtbegin wants to declare a
+ char dso_handle = 0;
+ here. ??? */
+
typedef void (*func_ptr) (void);
func_ptr _dtors [] = {DTOR_NAME, 0};
func_ptr _ctors [] = {CTOR_NAME, 0};
diff --git a/gcc/ada/vx_crtend.c b/gcc/ada/vx_crtend.c
index 0c9fe77..0c04d5d 100644
--- a/gcc/ada/vx_crtend.c
+++ b/gcc/ada/vx_crtend.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 2017, Free Software Foundation, Inc. *
+ * Copyright (C) 2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
self.main_xml = 'meson.wxs' self.main_o = 'meson.wixobj' self.final_output = f'meson-{self.version}-64.msi' self.staging_dirs = ['dist', 'dist2'] self.progfile_dir = 'ProgramFiles64Folder' redist_globs = ['C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Redist\\MSVC\\v*\\MergeModules\\Microsoft_VC142_CRT_x64.msm', 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Redist\\MSVC\\v*\\MergeModules\\Microsoft_VC143_CRT_x64.msm'] redist_path = None for g in redist_globs: trials = glob(g) if len(trials) > 1: sys.exit('MSM glob matched multiple entries:' + '\n'.join(trials)) if len(trials) == 1: redist_path = trials[0] break if redist_path is None: sys.exit('No MSMs found.') self.redist_path = redist_path self.component_num = 0 self.feature_properties = { self.staging_dirs[0]: { 'Id': 'MainProgram', 'Title': 'Meson', 'Description': 'Meson executables', 'Level': '1', 'AllowAbsent': 'no', }, self.staging_dirs[1]: { 'Id': 'NinjaProgram', 'Title': 'Ninja', 'Description': 'Ninja build tool', 'Level': '1', } } self.feature_components = {} for s_d in self.staging_dirs: self.feature_components[s_d] = [] def build_dist(self): ''' Build dist file from PyInstaller info ''' for sdir in self.staging_dirs: if os.path.exists(sdir): shutil.rmtree(sdir) main_stage, ninja_stage = self.staging_dirs pyinstaller = shutil.which('pyinstaller') if not pyinstaller: print("ERROR: This script requires pyinstaller.") sys.exit(1) pyinstaller_tmpdir = 'pyinst-tmp' if os.path.exists(pyinstaller_tmpdir): shutil.rmtree(pyinstaller_tmpdir) pyinst_cmd = [pyinstaller, '--clean', '--additional-hooks-dir=packaging', '--distpath', pyinstaller_tmpdir] pyinst_cmd += ['meson.py'] subprocess.check_call(pyinst_cmd) shutil.move(pyinstaller_tmpdir + '/meson', main_stage) self.del_infodirs(main_stage) if not os.path.exists(os.path.join(main_stage, 'meson.exe')): sys.exit('Meson exe missing from staging dir.') os.mkdir(ninja_stage) shutil.copy(shutil.which('ninja'), ninja_stage) if not os.path.exists(os.path.join(ninja_stage, 'ninja.exe')): sys.exit('Ninja exe missing from staging dir.') def del_infodirs(self, dirname): # Starting with 3.9.something there are some # extra metadatadirs that have a hyphen in their # file names. This is a forbidden character in WiX # filenames so delete them. for d in glob(os.path.join(dirname, '*-info')): shutil.rmtree(d) def generate_files(self): ''' Generate package files for MSI installer package ''' self.root = ET.Element('Wix', { 'xmlns': 'http://wixtoolset.org/schemas/v4/wxs', 'xmlns:ui': 'http://wixtoolset.org/schemas/v4/wxs/ui' }) package = ET.SubElement(self.root, 'Package', { 'Name': self.product_name, 'Manufacturer': 'The Meson Development Team', 'UpgradeCode': self.update_guid, 'Language': '1033', 'Codepage': '1252', 'Version': self.version, }) ET.SubElement(package, 'SummaryInformation', { 'Keywords': 'Installer', 'Description': f'Meson {self.version} installer', 'Manufacturer': 'The Meson Development Team', }) ET.SubElement(package, 'Launch', {'Message': 'This application is only supported on Windows 10 or higher.', 'Condition': 'X'*len(WINVER_CHECK)}) ET.SubElement(package, 'MajorUpgrade', {'DowngradeErrorMessage': 'A newer version of Meson is already installed.'}) ET.SubElement(package, 'Media', { 'Id': '1', 'Cabinet': 'meson.cab', 'EmbedCab': 'yes', }) targetdir = ET.SubElement(package, 'StandardDirectory', { 'Id': 'ProgramFiles64Folder', }) installdir = ET.SubElement(targetdir, 'Directory', { 'Id': 'INSTALLDIR', 'Name': 'Meson', }) ET.SubElement(installdir, 'Merge', { 'Id': 'VCRedist', 'SourceFile': self.redist_path, 'DiskId': '1', 'Language': '0', }) ET.SubElement(package, 'ui:WixUI', { 'Id': 'WixUI_FeatureTree', }) for s_d in self.staging_dirs: assert os.path.isdir(s_d) top_feature = ET.SubElement(package, 'Feature', { 'Id': 'Complete', 'Title': 'Meson ' + self.version, 'Description': 'The complete package', 'Display': 'expand', 'Level': '1', 'ConfigurableDirectory': 'INSTALLDIR', }) for s_d in self.staging_dirs: nodes = {} for root, dirs, files in os.walk(s_d): cur_node = Node(dirs, files) nodes[root] = cur_node self.create_xml(nodes, s_d, installdir, s_d) self.build_features(top_feature, s_d) vcredist_feature = ET.SubElement(top_feature, 'Feature', { 'Id': 'VCRedist', 'Title': 'Visual C++ runtime', 'AllowAdvertise': 'no', 'Display': 'hidden', 'Level': '1', }) ET.SubElement(vcredist_feature, 'MergeRef', {'Id': 'VCRedist'}) ET.ElementTree(self.root).write(self.main_xml, encoding='utf-8', xml_declaration=True) # ElementTree cannot do pretty-printing, so do it manually import xml.dom.minidom doc = xml.dom.minidom.parse(self.main_xml) with open(self.main_xml, 'w') as open_file: open_file.write(doc.toprettyxml()) # One last fix, add CDATA. with open(self.main_xml) as open_file: data = open_file.read() data = data.replace('X'*len(WINVER_CHECK), WINVER_CHECK) with open(self.main_xml, 'w') as open_file: open_file.write(data) def build_features(self, top_feature, staging_dir): ''' Generate build features ''' feature = ET.SubElement(top_feature, 'Feature', self.feature_properties[staging_dir]) for component_id in self.feature_components[staging_dir]: ET.SubElement(feature, 'ComponentRef', { 'Id': component_id, }) def create_xml(self, nodes, current_dir, parent_xml_node, staging_dir): ''' Create XML file ''' cur_node = nodes[current_dir] if cur_node.files: component_id = f'ApplicationFiles{self.component_num}' comp_xml_node = ET.SubElement(parent_xml_node, 'Component', { 'Id': component_id, 'Bitness': 'always64', 'Guid': gen_guid(), }) self.feature_components[staging_dir].append(component_id) if self.component_num == 0: ET.SubElement(comp_xml_node, 'Environment', { 'Id': 'Environment', 'Name': 'PATH', 'Part': 'last', 'System': 'yes', 'Action': 'set', 'Value': '[INSTALLDIR]', }) self.component_num += 1 for f_node in cur_node.files: file_id = os.path.join(current_dir, f_node).replace('\\', '_').replace('#', '_').replace('-', '_') ET.SubElement(comp_xml_node, 'File', { 'Id': file_id, 'Name': f_node, 'Source': os.path.join(current_dir, f_node), }) for dirname in cur_node.dirs: dir_id = os.path.join(current_dir, dirname).replace('\\', '_').replace('/', '_').replace('-', '_') dir_node = ET.SubElement(parent_xml_node, 'Directory', { 'Id': dir_id, 'Name': dirname, }) self.create_xml(nodes, os.path.join(current_dir, dirname), dir_node, staging_dir) def build_package(self): ''' Generate the Meson build MSI package. ''' subprocess.check_call(['wix', 'build', '-bindvariable', 'WixUILicenseRtf=packaging\\License.rtf', '-ext', 'WixToolset.UI.wixext', '-culture', 'en-us', '-arch', 'x64', '-o', self.final_output, self.main_xml, ]) def install_wix(): subprocess.check_call(['dotnet', 'nuget', 'add', 'source', 'https://api.nuget.org/v3/index.json']) subprocess.check_call(['dotnet', 'tool', 'install', '--global', 'wix']) subprocess.check_call(['wix', 'extension', 'add', 'WixToolset.UI.wixext', ]) if __name__ == '__main__': if not os.path.exists('meson.py'): sys.exit(print('Run me in the top level source dir.')) if not shutil.which('wix'): install_wix() subprocess.check_call(['pip', 'install', '--upgrade', 'pyinstaller']) p = PackageGenerator() p.build_dist() p.generate_files() p.build_package()