This is an archive of the discontinued LLVM Phabricator instance.

[LLD] Use cpio -it instead of cpio -t
ClosedPublic

Authored by kettenis on Dec 20 2016, 2:26 PM.

Details

Summary

OpenBSD's cpio does not accept the -t option without -i.
Apparently some systems implement cpio -t as a shortcut
for cpio -it, the latter is the only thing that's documented.
This change avoids test failures on OpenBSD.

Diff Detail

Repository
rL LLVM

Event Timeline

kettenis updated this revision to Diff 82154.Dec 20 2016, 2:26 PM
kettenis retitled this revision from to [LLD] Use cpio -it instead of cpio -t .
kettenis updated this object.
kettenis added a reviewer: lld.
kettenis added a subscriber: llvm-commits.
grimar added a subscriber: grimar.EditedDec 20 2016, 11:07 PM

Not relative to this patch, just a hint:

I think you want to add the reviewers to the patches you posting. Otherwise your patches are still visible on llvm-mails,
but reviewers do not get a direct mail and can probably just lose it.

For LLD Rui and Rafael are usually good candidates to add.

davide accepted this revision.Dec 21 2016, 2:32 AM
davide added a reviewer: davide.
davide added a subscriber: davide.

I guess this is fine, but please make sure the test doesn't fail on Windows.

This revision is now accepted and ready to land.Dec 21 2016, 2:32 AM

I can confirm that passes tests on windows for me. (I am using GnuWin32)

Fair enough. @kettenis out of curiosity, you know why OpenBSD doesn't implement this shortcut?

My guess is that it is an (undocumented) GNU extension. FreeBSD's libarchive-based cpio obviously attempts to implement the GNU extensions.
OpenBSD used a different cpio implementation inherited from NetBSD, and we generally avoid implementing GNU extensions to encourage our
users to write portable code/scripts. FWIW, the Solaris cpio doesn't accept -t without -i either.

This revision was automatically updated to reflect the committed changes.

Committed thusly, thanks for your contribution.

Commit this patch to SVN? ([y]es (default)|[n]o|[q]uit|[a]ll): y

M       test/ELF/reproduce-backslash.s
M       test/ELF/reproduce-windows.s
M       test/ELF/reproduce.s

Committed r290252