From 42099a90a23c31d1af95ceac590938d50a362cf9 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 27 May 2021 21:53:29 -0400 Subject: [PATCH 1/2] rs6000: Override TARGET_RUST_OS_INFO in linux64.h Both config/rs6000/sysv4.h and config/rs6000/linux64.h define TARGET_RUST_OS_INFO, and both are included in that order in tm.h. This change eliminates the error directive, permitting the more specific definition in linux64.h to override the prior definition in sysv4.h. gcc/ChangeLog: 2021-05-27 Thomas Fitzsimmons * config/rs6000/linux64.h: Undefine TARGET_RUST_OS_INFO before defining it. --- gcc/config/rs6000/linux64.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index fbd8cf0a693..536007ca685 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -314,9 +314,8 @@ extern int dot_symbols; } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in linux64.h (rs6000) - c++ undefines it and redefines it." -#endif +/* Override less-specific rs6000/sysv4.h definition. */ +#undef TARGET_RUST_OS_INFO #define TARGET_RUST_OS_INFO() \ do { \ GNU_USER_TARGET_RUST_OS_INFO(); \ -- 2.30.0