Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support nostdlib compiling? #296

Open
RodrigoDornelles opened this issue Jun 15, 2022 · 3 comments
Open

support nostdlib compiling? #296

RodrigoDornelles opened this issue Jun 15, 2022 · 3 comments

Comments

@RodrigoDornelles
Copy link
Owner

important to keep the language pure, and keep it even more portable with as few dependencies as possible.

@ghost
Copy link

ghost commented Jun 17, 2022

Ok, so i commented <stdlib.h> in 3bc.h, thats the output from compiler:
nostdlib.txt

@RodrigoDornelles RodrigoDornelles changed the title drop stdlib dependency and change to unistd support nostdlib compiling? Jul 19, 2022
@RodrigoDornelles
Copy link
Owner Author

  "___error", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "___memset_chk", referenced from:
      _ds_hypervisor_darray_new in main-64ca74.o
  "___snprintf_chk", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
  "___stack_chk_fail", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
      _interpreter_parser_strtol in main-64ca74.o
  "___stack_chk_guard", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
      _interpreter_parser_strtol in main-64ca74.o
  "___stderrp", referenced from:
      _driver_power_init in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "___stdinp", referenced from:
      _driver_power_init in main-64ca74.o
  "___stdoutp", referenced from:
      _driver_power_init in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "___strcpy_chk", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "_abs", referenced from:
      _driver_tty_output in main-64ca74.o
     (maybe you meant: _cpu_math_abs)
  "_clock", referenced from:
      _driver_idle in main-64ca74.o
  "_clock_gettime", referenced from:
      _driver_idle in main-64ca74.o
  "_exit", referenced from:
      _driver_power_signal in main-64ca74.o
     (maybe you meant: _driver_tty_exit, _driver_power_exit )
  "_fclose", referenced from:
      _driver_power_exit in main-64ca74.o
  "_fflush", referenced from:
      _driver_tty_exit in main-64ca74.o
  "_fgetc", referenced from:
      _interpreter_ticket in main-64ca74.o
  "_fopen", referenced from:
      _driver_power_init in main-64ca74.o
  "_fputs", referenced from:
      _driver_tty_output_raw in main-64ca74.o
  "_free", referenced from:
      _ds_procedure_lifo_pop in main-64ca74.o
      _interpreter_ticket in main-64ca74.o
      _ds_memory_llrbt_clear in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
      _ds_program_fifo_destroy in main-64ca74.o
     (maybe you meant: _cpu_memory_ptr_free, _cpu_memory_free , _cpu_memory_aux_free , _driver_memory_free )
  "_getchar", referenced from:
      _driver_tty_input in main-64ca74.o
  "_isdigit", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "_labs", referenced from:
      _cpu_math_abs in main-64ca74.o
  "_log", referenced from:
      _cpu_math_logb in main-64ca74.o
      _cpu_math_logn in main-64ca74.o
     (maybe you meant: _cpu_math_logb, _cpu_math_logn )
  "_log10", referenced from:
      _cpu_math_logb in main-64ca74.o
  "_log2", referenced from:
      _cpu_math_logb in main-64ca74.o
      _driver_tty_output in main-64ca74.o
  "_malloc", referenced from:
      _ds_procedure_lifo_push in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
      _ds_label_hash_insert in main-64ca74.o
      _ds_memory_llrbt_create_node in main-64ca74.o
      _ds_program_fifo_resize in main-64ca74.o
  "_memset", referenced from:
      _driver_tty_input in main-64ca74.o
  "_pow", referenced from:
      _cpu_math_power in main-64ca74.o
      _cpu_math_root in main-64ca74.o
     (maybe you meant: _driver_power_exit, _driver_power_init , _driver_power_signal , _cpu_math_power )
  "_realloc", referenced from:
      _interpreter_ticket in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
  "_signal", referenced from:
      _driver_power_init in main-64ca74.o
     (maybe you meant: _driver_power_signal)
  "_sscanf", referenced from:
      _driver_tty_input in main-64ca74.o
  "_strchr", referenced from:
      _interpreter_tokens in main-64ca74.o
  "_strtol", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
     (maybe you meant: _interpreter_parser_strtol)
  "_tcgetattr", referenced from:
      _driver_tty_init in main-64ca74.o
  "_tcsetattr", referenced from:
      _driver_tty_input in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "_tolower", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
      _interpreter_syntax_registers in main-64ca74.o
      _interpreter_syntax_constants in main-64ca74.o
      ```

@ghost
Copy link

ghost commented Jul 19, 2022

  "___error", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "___memset_chk", referenced from:
      _ds_hypervisor_darray_new in main-64ca74.o
  "___snprintf_chk", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
  "___stack_chk_fail", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
      _interpreter_parser_strtol in main-64ca74.o
  "___stack_chk_guard", referenced from:
      _driver_program_error in main-64ca74.o
      _driver_tty_output in main-64ca74.o
      _interpreter_parser_strtol in main-64ca74.o
  "___stderrp", referenced from:
      _driver_power_init in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "___stdinp", referenced from:
      _driver_power_init in main-64ca74.o
  "___stdoutp", referenced from:
      _driver_power_init in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "___strcpy_chk", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "_abs", referenced from:
      _driver_tty_output in main-64ca74.o
     (maybe you meant: _cpu_math_abs)
  "_clock", referenced from:
      _driver_idle in main-64ca74.o
  "_clock_gettime", referenced from:
      _driver_idle in main-64ca74.o
  "_exit", referenced from:
      _driver_power_signal in main-64ca74.o
     (maybe you meant: _driver_tty_exit, _driver_power_exit )
  "_fclose", referenced from:
      _driver_power_exit in main-64ca74.o
  "_fflush", referenced from:
      _driver_tty_exit in main-64ca74.o
  "_fgetc", referenced from:
      _interpreter_ticket in main-64ca74.o
  "_fopen", referenced from:
      _driver_power_init in main-64ca74.o
  "_fputs", referenced from:
      _driver_tty_output_raw in main-64ca74.o
  "_free", referenced from:
      _ds_procedure_lifo_pop in main-64ca74.o
      _interpreter_ticket in main-64ca74.o
      _ds_memory_llrbt_clear in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
      _ds_program_fifo_destroy in main-64ca74.o
     (maybe you meant: _cpu_memory_ptr_free, _cpu_memory_free , _cpu_memory_aux_free , _driver_memory_free )
  "_getchar", referenced from:
      _driver_tty_input in main-64ca74.o
  "_isdigit", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
  "_labs", referenced from:
      _cpu_math_abs in main-64ca74.o
  "_log", referenced from:
      _cpu_math_logb in main-64ca74.o
      _cpu_math_logn in main-64ca74.o
     (maybe you meant: _cpu_math_logb, _cpu_math_logn )
  "_log10", referenced from:
      _cpu_math_logb in main-64ca74.o
  "_log2", referenced from:
      _cpu_math_logb in main-64ca74.o
      _driver_tty_output in main-64ca74.o
  "_malloc", referenced from:
      _ds_procedure_lifo_push in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
      _ds_label_hash_insert in main-64ca74.o
      _ds_memory_llrbt_create_node in main-64ca74.o
      _ds_program_fifo_resize in main-64ca74.o
  "_memset", referenced from:
      _driver_tty_input in main-64ca74.o
  "_pow", referenced from:
      _cpu_math_power in main-64ca74.o
      _cpu_math_root in main-64ca74.o
     (maybe you meant: _driver_power_exit, _driver_power_init , _driver_power_signal , _cpu_math_power )
  "_realloc", referenced from:
      _interpreter_ticket in main-64ca74.o
      _ds_hypervisor_darray_new in main-64ca74.o
  "_signal", referenced from:
      _driver_power_init in main-64ca74.o
     (maybe you meant: _driver_power_signal)
  "_sscanf", referenced from:
      _driver_tty_input in main-64ca74.o
  "_strchr", referenced from:
      _interpreter_tokens in main-64ca74.o
  "_strtol", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
     (maybe you meant: _interpreter_parser_strtol)
  "_tcgetattr", referenced from:
      _driver_tty_init in main-64ca74.o
  "_tcsetattr", referenced from:
      _driver_tty_input in main-64ca74.o
      _driver_tty_exit in main-64ca74.o
  "_tolower", referenced from:
      _interpreter_parser_strtol in main-64ca74.o
      _interpreter_syntax_registers in main-64ca74.o
      _interpreter_syntax_constants in main-64ca74.o
      ```

Pass -c flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant