This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] work around ClearCase bug
- From: Ian Lance Taylor <ian at airs dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 05 Dec 2001 23:46:57 -0800
- Subject: Re: [patch] work around ClearCase bug
- References: <20011206065844.GA8267@codesourcery.com>
Zack Weinberg <zack@codesourcery.com> writes:
> I'm doing some consulting work for Wind River. They use ClearCase
> extensively. It has a bug where close(2) will report failure with
> errno == EROFS for any file opened in a read-only "view" of the
> repository, even if the file was opened O_RDONLY.
>
> Most Unix utilities ignore error returns from close for files opened
> for reading, but BFD doesn't. Therefore, if you have object files
> stored in a read-only ClearCase view, GNU ld will fail when asked to
> link them.
>
> Fixing the ClearCase bug is not practical, so I'm submitting this
> workaround for BFD. It simply ignores a failed fclose(3) if the BFD
> object was opened for reading and errno is EROFS.
>
> Reactions?
I don't think GNU utilities should work around obvious bugs in a
proprietary product like ClearCase. If this were not an obvious bug
in ClearCase, I think it would be OK. If ClearCase were widely used,
I think it would be OK. If ClearCase were free, I think it might be
OK (though we would probably just fix ClearCase).
You can fix this yourself--in fact, you already have. I don't think
this fix should go into the GNU sources.
Ian