2019-08-26 14:27:45 +02:00
|
|
|
From 6984bd861cc595e56d26ea033851d9174e855129 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Himanshu Sahdev aka CunningLearner <sahdev.himan@gmail.com>
|
|
|
|
Date: Mon, 26 Aug 2019 16:57:13 +0530
|
|
|
|
Subject: [PATCH] as: facilitate tests based on /dev/null
|
|
|
|
|
|
|
|
Signed-off-by: Himanshu Sahdev <himanshusah@hcl.com>
|
|
|
|
|
|
|
|
---
|
|
|
|
gas/as.c | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/gas/as.c b/gas/as.c
|
|
|
|
index 728811bc..78b4802c 100644
|
|
|
|
--- a/gas/as.c
|
|
|
|
+++ b/gas/as.c
|
2023-07-30 18:18:41 +02:00
|
|
|
@@ -1364,13 +1364,14 @@ main (int argc, char ** argv)
|
2019-08-26 14:27:45 +02:00
|
|
|
char ** argv_orig = argv;
|
|
|
|
struct stat sob;
|
2023-07-30 18:18:41 +02:00
|
|
|
|
2019-08-26 14:27:45 +02:00
|
|
|
+ const char *dev_null_file="/dev/null";
|
2023-07-30 18:18:41 +02:00
|
|
|
gas_early_init (&argc, &argv);
|
2019-08-26 14:27:45 +02:00
|
|
|
|
2023-07-30 18:18:41 +02:00
|
|
|
/* Call parse_args before gas_init so that switches like
|
|
|
|
--hash-size can be honored. */
|
2019-08-26 14:27:45 +02:00
|
|
|
parse_args (&argc, &argv);
|
|
|
|
|
|
|
|
- if (argc > 1 && stat (out_file_name, &sob) == 0)
|
|
|
|
+ if (argc > 1 && stat (out_file_name, &sob) == 0 && strcmp(out_file_name,dev_null_file)!=0)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
--
|
|
|
|
2.17.1
|
|
|
|
|