Commit Graph

12 Commits (f2378fc8d8afd9e97d2b51b0b09e62c70eb8b39b)

Author SHA1 Message Date
Chris Burel c89376e9c3 The flag is `--no-undefined`, not `-Wl,-undefined,error`
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Chris Burel 8acda7d04d Prefer CMake's built-in `-fPIC` and `-fpie` support
CMake has a built-in property, `POSITION_INDEPENDENT_CODE`, that determines
if code will be built with `-fPIC`. This property is `True` by default for
`SHARED` and `MODULE` library targets and `False` otherwise. Previously,
we were always passing the `-fPIC` flag manually. With this change, we set
the appropriate CMake variable that will enable the property for all
compile jobs.

Furthermore, with CMake policy CMP0083 set to "new" (which happens by
default when the `cmake_minimum_required` version is >=3.14), CMake has
built-in support for passing the `-fpie` flag when building executables. It
uses the same property, `POSITION_INDEPENDENT_CODE`, so setting this
property (and enabling it with the CMake `CheckPIESupported` module) allows
us to use CMake's built-in support for these flags.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Steve Pham 0f9c369d7c
Fix Clang built executables so they can be launched from the file explorer (#7562)
* Remove Position Independent Executable link flags from EXEs

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
Steve Pham 4d4f10beb8
Clang/GCC compiler settings update [SECURITY] (#7358)
- Add the following compilation flags for clang
  -fpie
  -fstack-protector-all
  -fstack-check (non-release)

- Add the following compilation flags for gcc
  -fpie
  -fstack-protector-all

- Fix -Wunused-result errors from above compilation flag updates

- Add _FORTIFY_SOURCE=2 to GCC DEFINES

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
4 years ago
Steve Pham 59e43813f0
GCC Support for Linux
Updates and fixes to support GCC for Linux

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
L4stR1t3s cf2effc58c
Ninja compile and link pool CMake settings (#2334)
* Ninja compile and link pool CMake settings

Signed-off-by: L4stR1t3s <69721170+L4stR1t3s@users.noreply.github.com>

* Added CMake cached variables for Ninja compile/link pool settings

Signed-off-by: L4stR1t3s <69721170+L4stR1t3s@users.noreply.github.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Esteban Papp c02345fd71
LYN-4657 OSX: Building AutomatedTesting project fails (#1436)
* LYN-4657 OSX: Building AutomatedTesting project fails

* forgot this file
5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago