mirror of
https://github.com/darlinghq/cctools-port.git
synced 2024-11-26 21:50:26 +00:00
Revert "Make 'as' relocatable"
This reverts commit 5674c31aac
.
I accidentally committed this again...
This commit is contained in:
parent
cfc428bc52
commit
bef74700f8
@ -29,26 +29,6 @@ int argc,
|
||||
char **argv,
|
||||
char **envp)
|
||||
{
|
||||
/* cctools-port */
|
||||
char libexec[MAXPATHLEN], libexec_old[MAXPATHLEN];
|
||||
unsigned int libexec_len = sizeof(libexec);
|
||||
_Static_assert(sizeof(ASLIBEXECDIR) < sizeof(libexec), "");
|
||||
strcpy(libexec_old, ASLIBEXECDIR);
|
||||
#undef ASLIBEXECDIR
|
||||
const char *ASLIBEXECDIR = libexec;
|
||||
if (!_NSGetExecutablePath(libexec, &libexec_len))
|
||||
{
|
||||
char *p = strrchr(libexec, '/');
|
||||
if (sizeof(libexec) - (p - libexec) < 5)
|
||||
abort();
|
||||
strcpy(p, "/../");
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(libexec, libexec_old);
|
||||
}
|
||||
/* cctools-port end */
|
||||
|
||||
const char *LIB = ASLIBEXECDIR;
|
||||
const char *LOCALLIB = ASLIBEXECDIR;
|
||||
const char *AS = "/as";
|
||||
|
Loading…
Reference in New Issue
Block a user