diff options
author | Adeel <adeelbm@outlook.com> | 2017-10-04 23:49:24 +0300 |
---|---|---|
committer | Adeel <adeelbm@outlook.com> | 2017-10-04 23:49:24 +0300 |
commit | 753c19b595773f4fabbba09ef184385324271d45 (patch) | |
tree | 4aa695538ab8c41d4aa48ed16635f90e4e5d7663 /src/Native/inc/unix | |
parent | 72a64d72d9d07dc2b9085a22129e3361c7b34dcd (diff) |
Enable x86 support for Unix
Also enabled cross compilation of x86 binaries on x64 host.
Ubuntu Dockerfiles:
<details>
<summary><b><ins>Baseline: x64 build on x64 host</ins></b></summary>
```dockerfile
FROM ubuntu
RUN cat /etc/*-release
RUN apt-get update
RUN apt-get install -y \
autoconf bash clang cmake gcc libtool curl \
libunwind-dev llvm make openssl lldb git uuid-dev
RUN git clone https://github.com/dotnet/corert -b master --single-branch
WORKDIR /corert
RUN ./build.sh # or ./build.sh x64
```
</details>
<details>
<summary><b><ins>PR: x86 build on x86 host</ins></b></summary>
```dockerfile
FROM i386/ubuntu
RUN cat /etc/*-release
RUN apt-get update
RUN apt-get install -y \
bash clang cmake gcc libtool curl \
libunwind-dev llvm make openssl lldb git uuid-dev
RUN git clone https://github.com/am11/corert -b linux-x86 --single-branch
WORKDIR /corert
RUN ./build.sh x86
```
</details>
<details>
<summary><b><ins>PR: x86 build on x64 host</ins></b></summary>
```dockerfile
FROM ubuntu
RUN cat /etc/*-release
RUN apt-get update
RUN apt-get install -y \
bash clang cmake gcc libtool curl \
libunwind-dev llvm make openssl lldb git uuid-dev \
g++-multilib
RUN git clone https://github.com/am11/corert -b linux-x86 --single-branch
WORKDIR /corert
RUN ./build.sh x86
```
</details>
Diffstat (limited to 'src/Native/inc/unix')
-rw-r--r-- | src/Native/inc/unix/poppack.h | 40 | ||||
-rw-r--r-- | src/Native/inc/unix/pshpack1.h | 39 | ||||
-rw-r--r-- | src/Native/inc/unix/pshpack4.h | 39 |
3 files changed, 118 insertions, 0 deletions
diff --git a/src/Native/inc/unix/poppack.h b/src/Native/inc/unix/poppack.h new file mode 100644 index 000000000..aee3b49a3 --- /dev/null +++ b/src/Native/inc/unix/poppack.h @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// + +// +// =========================================================================== +// File: poppack.h +// +// =========================================================================== +/* +Abstract: + + This file turns packing of structures off. (That is, it enables + automatic alignment of structure fields.) An include file is needed + because various compilers do this in different ways. + + poppack.h is the complement to pshpack?.h. An inclusion of poppack.h + MUST ALWAYS be preceded by an inclusion of one of pshpack?.h, in one-to-one + correspondence. + + For Microsoft compatible compilers, this file uses the pop option + to the pack pragma so that it can restore the previous saved by the + pshpack?.h include file. + +*/ + +#if ! (defined(lint) || defined(RC_INVOKED)) +#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED) +#pragma warning(disable:4103) +#if !(defined( MIDL_PASS )) || defined( __midl ) +#pragma pack(pop) +#else +#pragma pack() +#endif +#else +#pragma pack() +#endif +#endif // ! (defined(lint) || defined(RC_INVOKED)) + diff --git a/src/Native/inc/unix/pshpack1.h b/src/Native/inc/unix/pshpack1.h new file mode 100644 index 000000000..884e4c9c4 --- /dev/null +++ b/src/Native/inc/unix/pshpack1.h @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// + +// +// =========================================================================== +// File: pshpack1.h +// +// =========================================================================== + +/*++ + +Abstract: + + This file turns 1 byte packing of structures on. (That is, it disables + automatic alignment of structure fields.) An include file is needed + because various compilers do this in different ways. For Microsoft + compatible compilers, this files uses the push option to the pack pragma + so that the poppack.h include file can restore the previous packing + reliably. + + The file poppack.h is the complement to this file. + +--*/ + +#if ! (defined(lint) || defined(RC_INVOKED)) +#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED) +#pragma warning(disable:4103) +#if !(defined( MIDL_PASS )) || defined( __midl ) +#pragma pack(push,1) +#else +#pragma pack(1) +#endif +#else +#pragma pack(1) +#endif +#endif // ! (defined(lint) || defined(RC_INVOKED)) + diff --git a/src/Native/inc/unix/pshpack4.h b/src/Native/inc/unix/pshpack4.h new file mode 100644 index 000000000..c72dec96e --- /dev/null +++ b/src/Native/inc/unix/pshpack4.h @@ -0,0 +1,39 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// + +// +// =========================================================================== +// File: pshpack4.h +// +// =========================================================================== + +/*++ + +Abstract: + + This file turns 4 byte packing of structures on. (That is, it disables + automatic alignment of structure fields.) An include file is needed + because various compilers do this in different ways. For Microsoft + compatible compilers, this files uses the push option to the pack pragma + so that the poppack.h include file can restore the previous packing + reliably. + + The file poppack.h is the complement to this file. + +--*/ + +#if ! (defined(lint) || defined(RC_INVOKED)) +#if ( _MSC_VER >= 800 && !defined(_M_I86)) || defined(_PUSHPOP_SUPPORTED) +#pragma warning(disable:4103) +#if !(defined( MIDL_PASS )) || defined( __midl ) +#pragma pack(push,4) +#else +#pragma pack(4) +#endif +#else +#pragma pack(4) +#endif +#endif // ! (defined(lint) || defined(RC_INVOKED)) + |