Commit d6eb63ec authored by boklm's avatar boklm Committed by Georg Koppen
Browse files

Bug 18691: switch Windows builds from precise to jessie

parent ccf20f2c
......@@ -13,8 +13,8 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
mkdir -p $pydir/Lib/site-packages
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(winepath -w $pydir)
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
python2 setup.py build --build-lib build
cp -a build/argparse.py $PTDIR/
......
......@@ -15,7 +15,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -25,6 +25,8 @@ cd [% project %]-[% c("version") %]
patch -p1 < ../peXXigen.patch
# Needed for the hardening...
patch -p1 < ../enable-reloc-section-ld.patch
# fix "right-hand operand of comma expression has no effect" warning
patch -p1 < ../fix-warning-bfd.patch
[% END -%]
[% IF c('var/windows-x86_64') -%]
patch -p1 < ../64bit-fixups.patch
......
......@@ -19,6 +19,8 @@ input_files:
- project: container-image
- filename: enable-reloc-section-ld.patch
enable: '[% c("var/windows") %]'
- filename: fix-warning-bfd.patch
enable: '[% c("var/windows") %]'
- filename: 64bit-fixups.patch
enable: '[% c("var/windows-x86_64") %]'
- filename: peXXigen.patch
......
From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Wed, 29 Jan 2014 13:46:39 +0000
Subject: [PATCH] Following up on Tom's suggestion I am checking in a patch to
replace the various bfd_xxx_set macros with static inline functions, so that
we can avoid compile time warnings about comma expressions with unused
values.
* bfd-in.h (bfd_set_section_vma): Delete.
(bfd_set_section_alignment): Delete.
(bfd_set_section_userdata): Delete.
(bfd_set_cacheable): Delete.
* bfd.c (bfd_set_cacheable): New static inline function.
* section.c (bfd_set_section_userdata): Likewise.
(bfd_set_section_vma): Likewise.
(bfd_set_section_alignment): Likewise.
* bfd-in2.h: Regenerate.
---
bfd/bfd-in.h | 5 -----
bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------
bfd/bfd.c | 8 ++++++++
bfd/section.c | 26 ++++++++++++++++++++++++++
5 files changed, 81 insertions(+), 11 deletions(-)
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 3afd71b..c7c5a7d 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 71996db..b5aeb40 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
-
extern bfd_boolean bfd_cache_close
(bfd *abfd);
/* NB: This declaration should match the autogenerated one in libbfd.h. */
@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target);
bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-bfd *bfd_openstreamr (const char *, const char *, void *);
+bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
bfd *bfd_openr_iovec (const char *filename, const char *target,
void *(*open_func) (struct bfd *nbfd,
@@ -1596,6 +1591,32 @@ struct relax_table {
int size;
};
+/* Note: the following are provided as inline functions rather than macros
+ because not all callers use the return value. A macro implementation
+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+ compilers will complain about comma expressions that have no effect. */
+static inline bfd_boolean
+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+{
+ ptr->userdata = val;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+{
+ ptr->vma = ptr->lma = val;
+ ptr->user_set_vma = TRUE;
+ return TRUE;
+}
+
+static inline bfd_boolean
+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+{
+ ptr->alignment_power = val;
+ return TRUE;
+}
+
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
these sections. */
@@ -6415,6 +6436,14 @@ struct bfd
unsigned int selective_search : 1;
};
+/* See note beside bfd_set_section_userdata. */
+static inline bfd_boolean
+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+{
+ abfd->cacheable = val;
+ return TRUE;
+}
+
typedef enum bfd_error
{
bfd_error_no_error = 0,
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 8d0580c..2d174f3 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -311,6 +311,14 @@ CODE_FRAGMENT
. unsigned int selective_search : 1;
.};
.
+.{* See note beside bfd_set_section_userdata. *}
+.static inline bfd_boolean
+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+.{
+. abfd->cacheable = val;
+. return TRUE;
+.}
+.
*/
#include "sysdep.h"
diff --git a/bfd/section.c b/bfd/section.c
index fb19d8c..a661228 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -542,6 +542,32 @@ CODE_FRAGMENT
. int size;
.};
.
+.{* Note: the following are provided as inline functions rather than macros
+. because not all callers use the return value. A macro implementation
+. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+. compilers will complain about comma expressions that have no effect. *}
+.static inline bfd_boolean
+.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+.{
+. ptr->userdata = val;
+. return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+.{
+. ptr->vma = ptr->lma = val;
+. ptr->user_set_vma = TRUE;
+. return TRUE;
+.}
+.
+.static inline bfd_boolean
+.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+.{
+. ptr->alignment_power = val;
+. return TRUE;
+.}
+.
.{* These sections are global, and are managed by BFD. The application
. and target back end are not permitted to change the values in
. these sections. *}
--
2.1.4
......@@ -12,7 +12,7 @@ tar -C /var/tmp/build -xf $rootdir/[% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup_tbb.py py2exe
py2exe_zip_timestomp dist/fteproxy.zip
cp -an dist/{*.pyd,*.exe,*.zip} $PTDIR/
......
......@@ -18,7 +18,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -16,12 +16,12 @@ tar -C $distdir -xf $rootdir/[% c('input_files_by_name/obfsproxy') %]
pydir=$distdir/python
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
export LD_PRELOAD=
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
# FTE only needs libgmp-10.dll and no libgmpxx anymore.
cp -a /var/tmp/dist/gmp/bin/libgmp-10.dll .
cp -a /var/tmp/dist/gmp/bin/libgmp-10.dll $distdir/TorBrowser/Tor/
WINDOWS_BUILD=1 CROSS_COMPILE=1 make
$PYTHON setup.py install --prefix=$(winepath -w "$pydir")
$PYTHON setup.py install --prefix=$(wine winepath -w "$pydir")
$PYTHON setup.py install
[% ELSE -%]
export PYTHON=python2
......
......@@ -17,8 +17,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
- faketime
input_files:
......
......@@ -21,9 +21,9 @@ tar -C /var/tmp/build -xf $rootdir/[% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup_py2exe.py py2exe
$PYTHON setup.py install --prefix=$(winepath -w $pydir)
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
py2exe_zip_timestomp py2exe_bundle/dist/obfsproxy.zip
cp -an py2exe_bundle/dist/{*.pyd,*.exe,*.zip} $PTDIR/
# http://bugs.winehq.org/show_bug.cgi?id=3591
......
......@@ -20,7 +20,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -13,8 +13,8 @@ cd /var/tmp/build/Parsley-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
mkdir -p $pydir/Lib/site-packages
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(winepath -w $pydir)
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
PYTHON=python2
$PYTHON setup.py build --build-lib build
......
......@@ -15,7 +15,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -27,7 +27,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
ac_cv_func_malloc_0_nonnull=yes sh configure --host=i686-w64-mingw32
export LD_PRELOAD=
$PYTHON setup.py build_ext -c mingw32
$PYTHON setup.py install --prefix=$(winepath -w $pydir)
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
./configure --build=i686-linux-gnu [% c("var/configure_opt") %]
......
......@@ -15,9 +15,9 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- faketime
- wine
input_files:
- project: container-image
......
......@@ -14,7 +14,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
mkdir -p "$pydir"
$PYTHON setup.py install --single-version-externally-managed --record /dev/null --prefix=$(winepath -w $pydir)
$PYTHON setup.py install --single-version-externally-managed --record /dev/null --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
$PYTHON setup.py build --build-lib build
......
......@@ -19,7 +19,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -13,8 +13,8 @@ cd /var/tmp/build/PyYAML-[% c('version') %]
[% IF c("var/windows") -%]
pydir="$distdir/python"
mkdir -p $pydir/Lib/site-packages
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(winepath -w $pydir)
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
$PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
$PYTHON setup.py build --build-lib build
......
......@@ -15,7 +15,8 @@ targets:
windows-i686:
var:
compiler: winpython
post_pkginst: '[% c("var/install_wine_ppa") %]'
arch_deps:
- wine
input_files:
- project: container-image
......
......@@ -24,8 +24,8 @@ cd /var/tmp/build/Twisted-[% c('version') %]
# the -c option, so we set the compiler in a configuration file.
echo $'[build_ext]\ncompiler=mingw32' > setup.cfg
mkdir -p $pydir/Lib/site-packages
export PYTHONPATH="$(winepath -w $pydir)\\Lib\\site-packages"
LD_PRELOAD= $PYTHON setup.py install --single-version-externally-managed --record /dev/null --prefix=$(winepath -w $pydir)
export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
LD_PRELOAD= $PYTHON setup.py install --single-version-externally-managed --record /dev/null --prefix=$(wine winepath -w $pydir)
[% ELSE -%]
export PYTHON=python2
$PYTHON setup.py build --build-lib build
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment