From f9fa4a63414294ef4eb46f6acb5b649382620f2a Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 15 Feb 2012 00:56:16 +0000 Subject: [PATCH] * options.cc (General_options::finalize): Disallow -pie and -static. --- gold/ChangeLog | 4 ++++ gold/options.cc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index 6c5078e7374..df835359ad9 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2012-02-14 Cary Coutant + + * options.cc (General_options::finalize): Disallow -pie and -static. + 2012-02-03 Doug Kwan * arm.cc (Arm_relocate_functions::abs8, diff --git a/gold/options.cc b/gold/options.cc index 64a8539d2ff..fe9a00e023d 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -1203,6 +1203,8 @@ General_options::finalize() gold_fatal(_("-shared and -static are incompatible")); if (this->shared() && this->pie()) gold_fatal(_("-shared and -pie are incompatible")); + if (this->pie() && this->is_static()) + gold_fatal(_("-pie and -static are incompatible")); if (this->shared() && this->relocatable()) gold_fatal(_("-shared and -r are incompatible")); -- 2.30.2