 631014d9b0
			
		
	
	631014d9b0
	
	
	
		
			
			/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
 #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
Fixed using backport of upstream commits [1-2] as discussed here
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632#c21
[1] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9970b576b7e4ae337af1268395ff221348c4b34a
[2] libcc1: fix <vector> include
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5213047b1d50af63dfabb5e5649821a6cb157e33
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
		
	
		
			
				
	
	
		
			66 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
 | ||
| From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
 | ||
| Date: Sat, 16 Mar 2024 09:50:00 +0100
 | ||
| Subject: [PATCH] libcc1: fix <vector> include
 | ||
| 
 | ||
| Use INCLUDE_VECTOR before including system.h, instead of directly
 | ||
| including <vector>, to avoid running into poisoned identifiers.
 | ||
| 
 | ||
| Signed-off-by: Dimitry Andric <dimitry@andric.com>
 | ||
| 
 | ||
| libcc1/ChangeLog:
 | ||
| 
 | ||
| 	PR middle-end/111632
 | ||
| 	* libcc1plugin.cc: Fix include.
 | ||
| 	* libcp1plugin.cc: Fix include.
 | ||
| ---
 | ||
|  libcc1/libcc1plugin.cc | 3 +--
 | ||
|  libcc1/libcp1plugin.cc | 3 +--
 | ||
|  2 files changed, 2 insertions(+), 4 deletions(-)
 | ||
| 
 | ||
| diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
 | ||
| index 72d17c3b81c..e64847466f4 100644
 | ||
| --- a/libcc1/libcc1plugin.cc
 | ||
| +++ b/libcc1/libcc1plugin.cc
 | ||
| @@ -32,6 +32,7 @@
 | ||
|  #undef PACKAGE_VERSION
 | ||
|  
 | ||
|  #define INCLUDE_MEMORY
 | ||
| +#define INCLUDE_VECTOR
 | ||
|  #include "gcc-plugin.h"
 | ||
|  #include "system.h"
 | ||
|  #include "coretypes.h"
 | ||
| @@ -69,8 +70,6 @@
 | ||
|  #include "gcc-c-interface.h"
 | ||
|  #include "context.hh"
 | ||
|  
 | ||
| -#include <vector>
 | ||
| -
 | ||
|  using namespace cc1_plugin;
 | ||
|  
 | ||
|  
 | ||
| diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
 | ||
| index 0eff7c68d29..da68c5d0ac1 100644
 | ||
| --- a/libcc1/libcp1plugin.cc
 | ||
| +++ b/libcc1/libcp1plugin.cc
 | ||
| @@ -33,6 +33,7 @@
 | ||
|  #undef PACKAGE_VERSION
 | ||
|  
 | ||
|  #define INCLUDE_MEMORY
 | ||
| +#define INCLUDE_VECTOR
 | ||
|  #include "gcc-plugin.h"
 | ||
|  #include "system.h"
 | ||
|  #include "coretypes.h"
 | ||
| @@ -71,8 +72,6 @@
 | ||
|  #include "rpc.hh"
 | ||
|  #include "context.hh"
 | ||
|  
 | ||
| -#include <vector>
 | ||
| -
 | ||
|  using namespace cc1_plugin;
 | ||
|  
 | ||
|  
 | ||
| -- 
 | ||
| 2.39.3
 | ||
| 
 |