diff --git a/gcc/collect2.c b/gcc/collect2.c
index 20c2533..e03c978 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -2799,12 +2799,10 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
 		      if ((name = ldgetname (ldptr, &symbol)) == NULL)
 			continue;		/* Should never happen.  */
 
-#ifdef XCOFF_DEBUGGING_INFO
 		      /* All AIX function names have a duplicate entry
 			 beginning with a dot.  */
-		      if (*name == '.')
+		      if (XCOFF_DEBUGGING_INFO && *name == '.')
 			++name;
-#endif
 
 		      switch (is_ctor_dtor (name))
 			{
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 13d0193..6ed82cb 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -30455,7 +30455,7 @@ macho_branch_islands (void)
 	}
       strcpy (tmp_buf, "\n");
       strcat (tmp_buf, label);
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
@@ -30505,7 +30505,7 @@ macho_branch_islands (void)
 	  strcat (tmp_buf, ")\n\tmtctr r12\n\tbctr");
 	}
       output_asm_insn (tmp_buf, 0);
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
       if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG)
 	dbxout_stabd (N_SLINE, bi->line_number);
 #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 5f4ea77..d9bd59f 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -91,12 +91,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "expr.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"
 #endif
 
 #ifndef ASM_STABS_OP
-# ifdef XCOFF_DEBUGGING_INFO
+# if XCOFF_DEBUGGING_INFO
 #  define ASM_STABS_OP "\t.stabx\t"
 # else
 #  define ASM_STABS_OP "\t.stabs\t"
@@ -217,7 +217,7 @@ struct dbx_file
    should always be 0 because we should not have needed any file numbers
    yet.  */
 
-#if (defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)) \
+#if (defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)) \
     && defined (DBX_USE_BINCL)
 static struct dbx_file *current_file;
 #endif
@@ -250,7 +250,7 @@ static GTY(()) int lastfile_is_base;
 /* Typical USG systems don't have stab.h, and they also have
    no use for DBX-format debugging info.  */
 
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 #ifdef DBX_USE_BINCL
 /* If zero then there is no pending BINCL.  */
@@ -382,7 +382,7 @@ const struct gcc_debug_hooks dbx_debug_hooks =
 };
 #endif /* DBX_DEBUGGING_INFO  */
 
-#if defined (XCOFF_DEBUGGING_INFO)
+#if (XCOFF_DEBUGGING_INFO)
 const struct gcc_debug_hooks xcoff_debug_hooks =
 {
   dbxout_init,
@@ -860,7 +860,7 @@ dbxout_finish_complex_stabs (tree sym, stab_code_type code,
   obstack_free (&stabstr_ob, str);
 }
 
-#if defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO)
+#if defined (DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 
 /* When -gused is used, emit debug info for only used symbols. But in
    addition to the standard intercepted debug_hooks there are some
@@ -3788,7 +3788,7 @@ void
 default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
 				  int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
@@ -3805,7 +3805,7 @@ void
 default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
 				   int priority ATTRIBUTE_UNUSED)
 {
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   /* Tell GNU LD that this is part of the static destructor set.
      This will work for any system that uses stabs, most usefully
      aout systems.  */
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
index 098213f..954e138 100644
--- a/gcc/dbxout.h
+++ b/gcc/dbxout.h
@@ -29,7 +29,7 @@ extern void default_stabs_asm_out_destructor (rtx, int);
 extern void default_stabs_asm_out_constructor (rtx, int);
 
 /* dbxout helper functions */
-#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
+#if defined DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
 
 extern void dbxout_int (int);
 extern void dbxout_stabd (int, int);
diff --git a/gcc/defaults.h b/gcc/defaults.h
index ddda89a..b518863 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -918,11 +918,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define SDB_DEBUGGING_INFO 0
 #endif
 
+#ifndef XCOFF_DEBUGGING_INFO
+#define XCOFF_DEBUGGING_INFO 0
+#endif
+
 /* If more than one debugging type is supported, you must define
    PREFERRED_DEBUGGING_TYPE to choose the default.  */
 
 #if 1 < (defined (DBX_DEBUGGING_INFO) + (SDB_DEBUGGING_INFO) \
-         + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
+	 + defined (DWARF2_DEBUGGING_INFO) + (XCOFF_DEBUGGING_INFO) \
          + defined (VMS_DEBUGGING_INFO))
 #ifndef PREFERRED_DEBUGGING_TYPE
 #error You must define PREFERRED_DEBUGGING_TYPE
@@ -942,7 +946,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #elif defined VMS_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
 
-#elif defined XCOFF_DEBUGGING_INFO
+#elif XCOFF_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
 
 #else
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index a174e21..0399248 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -9357,7 +9357,7 @@ in response to the @option{-g} option.
 @end defmac
 
 @defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
 in response to the @option{-g} option.  This is a variant of DBX format.
 @end defmac
 
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 9c13e9b..84e8383 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -6782,7 +6782,7 @@ in response to the @option{-g} option.
 @end defmac
 
 @defmac XCOFF_DEBUGGING_INFO
-Define this macro if GCC should produce XCOFF format debugging output
+Define this macro to 1 if GCC should produce XCOFF format debugging output
 in response to the @option{-g} option.  This is a variant of DBX format.
 @end defmac
 
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index ac89ce0..d16827b 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -31,10 +31,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "dwarf2asm.h"
 #include "dwarf2.h"
 
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
 
 /* Output an unaligned integer with the given value and size.  Prefer not
    to print a newline, since the caller may want to add a comment.  */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c42da7e..072e485 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -97,10 +97,6 @@ static rtx_insn *last_var_location_insn;
 static rtx_insn *cached_next_real_insn;
 static void dwarf2out_decl (tree);
 
-#ifndef XCOFF_DEBUGGING_INFO
-#define XCOFF_DEBUGGING_INFO 0
-#endif
-
 #ifndef HAVE_XCOFF_DWARF_EXTRAS
 #define HAVE_XCOFF_DWARF_EXTRAS 0
 #endif
diff --git a/gcc/final.c b/gcc/final.c
index 2f57b1b..a4b66c2 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "rtl-iter.h"
 #include "print-rtl.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations.  */
 #endif
 
diff --git a/gcc/function.c b/gcc/function.c
index afc2c87..e598af8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4671,7 +4671,7 @@ number_blocks (tree fn)
   /* For SDB and XCOFF debugging output, we start numbering the blocks
      from 1 within each function, rather than keeping a running
      count.  */
-#if SDB_DEBUGGING_INFO || defined (XCOFF_DEBUGGING_INFO)
+#if SDB_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO
   if (write_symbols == SDB_DEBUG || write_symbols == XCOFF_DEBUG)
     next_block_index = 1;
 #endif
diff --git a/gcc/toplev.c b/gcc/toplev.c
index b18d93e..420ae3d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -76,13 +76,13 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-chkp.h"
 #include "omp-low.h"
 
-#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
+#if defined(DBX_DEBUGGING_INFO) || (XCOFF_DEBUGGING_INFO)
 #include "dbxout.h"
 #endif
 
 #include "sdbout.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations. */
 #endif
 
@@ -1372,10 +1372,8 @@ process_options (void)
   else if (write_symbols == DBX_DEBUG)
     debug_hooks = &dbx_debug_hooks;
 #endif
-#if defined(XCOFF_DEBUGGING_INFO)
-  else if (write_symbols == XCOFF_DEBUG)
+  else if (XCOFF_DEBUGGING_INFO && write_symbols == XCOFF_DEBUG)
     debug_hooks = &xcoff_debug_hooks;
-#endif
   else if (SDB_DEBUGGING_INFO && write_symbols == SDB_DEBUG)
     debug_hooks = &sdb_debug_hooks;
 #ifdef DWARF2_DEBUGGING_INFO
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ec6aabf..75cef25 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -53,7 +53,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "asan.h"
 #include "rtl-iter.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 #include "xcoffout.h"		/* Needed for external data declarations.  */
 #endif
 
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index 0e9c65f..5d19f0c 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "output.h"
 #include "debug.h"
 
-#ifdef XCOFF_DEBUGGING_INFO
+#if XCOFF_DEBUGGING_INFO
 
 /* This defines the C_* storage classes.  */
 #include "xcoff.h"
