Skip to content

Commit e8cbf0f

Browse files
authored
Output predefined HAVE_ entries to Makefile.conf for ARM with specified TARGET
1 parent eec517a commit e8cbf0f

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

getarch.c

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,8 +1405,41 @@ int main(int argc, char *argv[]){
14051405

14061406
printf("NUM_CORES=%d\n", get_num_cores());
14071407

1408-
#if defined(__arm__) && !defined(FORCE)
1408+
#if defined(__arm__)
1409+
#if !defined(FORCE)
1410+
fprintf(stderr,"get features!\n");
14091411
get_features();
1412+
#else
1413+
fprintf(stderr,"split archconfig!\n");
1414+
sprintf(buffer, "%s", ARCHCONFIG);
1415+
1416+
p = &buffer[0];
1417+
1418+
while (*p) {
1419+
if ((*p == '-') && (*(p + 1) == 'D')) {
1420+
p += 2;
1421+
if (*p != 'H') {
1422+
while( (*p != ' ') && (*p != '-') && (*p != '\0') && (*p != '\n')) {p++; }
1423+
if (*p == '-') continue;
1424+
}
1425+
while ((*p != ' ') && (*p != '\0')) {
1426+
1427+
if (*p == '=') {
1428+
printf("=");
1429+
p ++;
1430+
while ((*p != ' ') && (*p != '\0')) {
1431+
printf("%c", *p);
1432+
p ++;
1433+
}
1434+
} else {
1435+
printf("%c", *p);
1436+
p ++;
1437+
if ((*p == ' ') || (*p =='\0')) printf("=1\n");
1438+
}
1439+
}
1440+
} else p ++;
1441+
}
1442+
#endif
14101443
#endif
14111444

14121445

0 commit comments

Comments
 (0)