Revert "Make 'as' relocatable"

This reverts commit 5674c31aac.

I accidentally committed this again...
This commit is contained in:
Thomas Pöchtrager 2019-10-31 20:29:29 +01:00
parent cfc428bc52
commit bef74700f8

View File

@ -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";