Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
Signed-off-by: leleliu008 <[email protected]>
  • Loading branch information
leleliu008 committed Apr 21, 2024
1 parent e51f09b commit 712ffed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wrapper-target-c++.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,17 @@ int main(int argc, char * argv[]) {
action = ACTION_CREATE_DYNAMICALLY_LINKED_EXECUTABLE;
}

fprintf(stderr, "action=%d\n", action);
/////////////////////////////////////////////////////////////////

char* argv2[argc + 5];

char sonameArg[100]; sonameArg[0] = '\0';

if (action == ACTION_CREATE_SHARED_LIBRARY) {
// remove -static , --static , -pie options if they also are specified
int oIndex = -1;

// remove -static , --static , -pie options if they also are specified
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-static") == 0) {
argv2[i] = (char*)"-fPIC";
Expand Down Expand Up @@ -242,6 +243,8 @@ int main(int argc, char * argv[]) {

const char * filename = argv[i] + slashIndex + 1;

fprintf(stderr, "filename=%s\n", filename);

if (strcmp(filename, "libm.so") == 0) {
argv[i][0] = '-';
argv[i][1] = 'l';
Expand Down

0 comments on commit 712ffed

Please sign in to comment.