Message ID | 0102018ff3193f2b-c2986265-c170-40b0-b2fd-f9adc3e0be73-000000@eu-west-1.amazonses.com |
---|---|
State | New |
Headers | show |
Series | lto: Fix build on MacOS | expand |
> Am 07.06.2024 um 16:30 schrieb Simon Martin <simon@nasilyan.com>: > > The build fails on x86_64-apple-darwin19.6.0 starting with 5b6d5a886ee because > vector is included after system.h and runs into poisoned identifiers. > > This patch fixes this by defining INCLUDE_VECTOR before including system.h. Ok > Validated by doing a full build on x86_64-apple-darwin19.6.0. > > gcc/lto/ChangeLog: > > * lto-partition.cc: Define INCLUDE_VECTOR to avoid running into > poisoned identifiers. > > --- > gcc/lto/lto-partition.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/lto/lto-partition.cc b/gcc/lto/lto-partition.cc > index 44b457d0b2a..2238650fa0e 100644 > --- a/gcc/lto/lto-partition.cc > +++ b/gcc/lto/lto-partition.cc > @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see > <http://www.gnu.org/licenses/>. */ > > #include "config.h" > +#define INCLUDE_VECTOR > #include "system.h" > #include "coretypes.h" > #include "target.h" > @@ -38,7 +39,6 @@ along with GCC; see the file COPYING3. If not see > #include "lto-partition.h" > > #include <limits> > -#include <vector> > > vec<ltrans_partition> ltrans_partitions; > > -- > 2.44.0 > >
diff --git a/gcc/lto/lto-partition.cc b/gcc/lto/lto-partition.cc index 44b457d0b2a..2238650fa0e 100644 --- a/gcc/lto/lto-partition.cc +++ b/gcc/lto/lto-partition.cc @@ -18,6 +18,7 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ #include "config.h" +#define INCLUDE_VECTOR #include "system.h" #include "coretypes.h" #include "target.h" @@ -38,7 +39,6 @@ along with GCC; see the file COPYING3. If not see #include "lto-partition.h" #include <limits> -#include <vector> vec<ltrans_partition> ltrans_partitions;