gas: make NO_LISTING work again

Presumably since no target enables this and there's also no configure
control, builds with NO_LISTING defined didn't really work anymore.
Convert fallback functions to macros and add #ifndef in a few places.
(Behavior is different for affected command line options vs directives:
The former are rejected as unrecognized, while the latter are silently
ignored. I think that's fair enough.)
This commit is contained in:
Jan Beulich
2025-03-14 10:30:47 +01:00
parent 5e713f7542
commit 2df22dd31d
3 changed files with 20 additions and 54 deletions

View File

@@ -1658,58 +1658,4 @@ listing_source_file (const char *file)
listing_tail->hll_file = file_info (file);
}
#else
/* Dummy functions for when compiled without listing enabled. */
void
listing_list (int on)
{
s_ignore (0);
}
void
listing_eject (int ignore)
{
s_ignore (0);
}
void
listing_psize (int ignore)
{
s_ignore (0);
}
void
listing_nopage (int ignore)
{
s_ignore (0);
}
void
listing_title (int depth)
{
s_ignore (0);
}
void
listing_file (const char *name)
{
}
void
listing_newline (char *name)
{
}
void
listing_source_line (unsigned int n)
{
}
void
listing_source_file (const char *n)
{
}
#endif