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

utils/flashrom doesn't build on mips due to undefined variables #18

Closed
RussellSenior opened this issue Jun 13, 2014 · 1 comment
Closed
Assignees

Comments

@RussellSenior
Copy link
Contributor

mipsel-openwrt-linux-uclibc-gcc -MMD -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/openwrt/src/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/home/openwrt/src/openwrt/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/home/openwrt/src/openwrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/openwrt/src/openwrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include  -Werror   -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_INTERNAL=1' -D'CONFIG_SERPROG=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_FT2232_SPI=1' -D'CONFIG_USBBLASTER_SPI=1' -D'HAVE_FT232H=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_LINUX_SPI=1' -D'NEED_PCI=1' -D'HAVE_UTSNAME=1' -D'FLASHROM_VERSION="0.9.7-r1711"' -o internal.o -c internal.c
internal.c: In function 'internal_init':
internal.c:340:52: error: 'cb_vendor' undeclared (first use in this function)
  if (board_flash_enable(board_vendor, board_model, cb_vendor, cb_model)) {
                                                    ^
internal.c:340:52: note: each undeclared identifier is reported only once for each function it appears in
internal.c:340:63: error: 'cb_model' undeclared (first use in this function)
  if (board_flash_enable(board_vendor, board_model, cb_vendor, cb_model)) {
                                                               ^
make[3]: *** [internal.o] Error 1

The cb_vendor and cb_model declarations are ifdef'd to specific architectures, not including mips/mipsel.

#if defined (__i386__) || defined (__x86_64__) || defined (__arm__)
        const char *cb_vendor = NULL;
        const char *cb_model = NULL;
#endif

I have no idea whether flashrom is useful on mips platforms, but it offended me by not building.

@Noltari
Copy link
Member

Noltari commented Jun 13, 2014

It should be fixed now:
0bc41a0

Thanks for reporting.

@Noltari Noltari closed this as completed Jun 13, 2014
stintel pushed a commit to stintel/openwrt-packages that referenced this issue Jul 6, 2015
Add package for babel source-routing branch
mkg20001 pushed a commit to mkg20001/packages that referenced this issue Jan 20, 2022
gluon-luci-autoupdater: Fix typo
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

2 participants