Using CCSHARED instead of LD to create shared libraries
This commit is contained in:
parent
db7638c97c
commit
2b16735b7a
@ -626,7 +626,7 @@ static void _variables_library(Configure * configure, FILE * fp, char * done)
|
|||||||
_makefile_output_variable(fp, "RANLIB", p);
|
_makefile_output_variable(fp, "RANLIB", p);
|
||||||
if((p = config_get(configure->config, "", "ld")) == NULL)
|
if((p = config_get(configure->config, "", "ld")) == NULL)
|
||||||
p = "$(CC) -shared";
|
p = "$(CC) -shared";
|
||||||
_makefile_output_variable(fp, "LD", p);
|
_makefile_output_variable(fp, "CCSHARED", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _variables_libtool(Configure * configure, FILE * fp, char * done)
|
static void _variables_libtool(Configure * configure, FILE * fp, char * done)
|
||||||
@ -1032,7 +1032,7 @@ static int _target_library(Configure * configure, FILE * fp,
|
|||||||
if((p = config_get(configure->config, target, "depends")) != NULL)
|
if((p = config_get(configure->config, target, "depends")) != NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
fprintf(fp, "%s%s%s", "\t$(LD) -o ", target, ".so");
|
fprintf(fp, "%s%s%s", "\t$(CCSHARED) -o ", target, ".so");
|
||||||
if((p = config_get(configure->config, target, "soname")) == NULL)
|
if((p = config_get(configure->config, target, "soname")) == NULL)
|
||||||
fprintf(fp, "%s%s%s", " -Wl,-soname,", target, ".so.0");
|
fprintf(fp, "%s%s%s", " -Wl,-soname,", target, ".so.0");
|
||||||
else
|
else
|
||||||
@ -1147,7 +1147,7 @@ static int _target_plugin(Configure * configure, FILE * fp,
|
|||||||
if((p = config_get(configure->config, target, "depends")) != NULL)
|
if((p = config_get(configure->config, target, "depends")) != NULL)
|
||||||
fprintf(fp, " %s", p);
|
fprintf(fp, " %s", p);
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
fprintf(fp, "%s%s%s%s%s%s%s", "\t$(LD) -o ", target, ".so $(",
|
fprintf(fp, "%s%s%s%s%s%s%s", "\t$(CCSHARED) -o ", target, ".so $(",
|
||||||
target, "_OBJS) $(", target, "_LDFLAGS)");
|
target, "_OBJS) $(", target, "_LDFLAGS)");
|
||||||
if((q = malloc(strlen(target) + 4)) != NULL)
|
if((q = malloc(strlen(target) + 4)) != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user